Hello,
I have been able to work on a script to edit the legend, based on a Flag column. When I recreate the same plot in GraphBuilder, I get a darker shade of colors, but when I run my script, it gives me a faded shade than normal. Why is this? I know it is something related to rows being selected, and the GraphBuilder just highlights those rows or cells. I have tried incorporating
dt << Clear Column Selection();
dt << Clear Row Selection();
but it does not work. The original plot

and the faded plot

dlg = Column Dialog(
yList = Col List( "Ys",
Min Col(1)
),
xList = Col List( "Xs",
Min Col(1),
Max Col(1)
),
byList = Col List( "Color/Mark By",
Max Col( 1 ) )
);
color_cols = dlg["byList"];
If( Is Missing( color_cols ) != {},
dt << Color or Mark by Column( color_cols[1], Marker Theme( "solid" ), Color Theme( "JMP Dark" ) );
for each row(
If(As Column( dt, color_cols[1] ) == "", As Column( dt, color_cols[1] )="!!");
);
dt << select where(As Column( dt, color_cols[1] ) == "!!" ) << Markers(0);
dt << select where(As Column( dt, color_cols[1] ) == "!!") << Colors(0);
);
dt << Clear Column Selection();
dt << Clear Row Selection();
meas_cols = dt << Get Column Names("String");
If(dlg["button"] == 1,
// Get the selected X and Y columns
x_col = dlg["xList"];
y_cols = dlg["yList"];
nw = New Window( "graphs", <<JOURNAL></JOURNAL>The flag column is stored in color_cols[1], which is the full form of region column for few cells, and empty everywhere else.