Adding custom marker and colors to GraphBuilder in JSLHello,
I am trying to add color/markers to row states through Flags mentioned in a particular column. For instance, working on the Cities dataset, I created random flags (5 different classes of flags) for few rows, and most are empty. Now, the majority of those values are plotted with a single black dot, I am fine with it. But, the major issue arises, when I try to create an individual value plot with a legend. I do not want the black dot to show up on the legend, I want the 5 different classes with different colors to show up.


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)
)
);
_files = dlg["byList"];
dt << Color or Mark by Column( _files[1], Marker Theme( "solid" ), Color Theme("JMP default") );
meas_cols = dt << Get Column Names("String");
// Get the selected X and Y columns
x_col = dlg["xList"];
y_cols = dlg["yList"];
// Create new window with a vertical list box to store graph builder objects
nw = New Window( "graphs", <<JOURNAL></JOURNAL>Automation and ScriptingBasic Data Analysis and ModelingRe: Adding custom marker and colors to GraphBuilder in JSLDid you try to drag your column on Overlay
or in JSL
Variables(X(x_col[1]), Y(y_cols[i]), Overlay(:mycol)),
Elements(Points(X, Y, Ovelay, Legend(24))),
Re: Adding custom marker and colors to GraphBuilder in JSLYes, I tried this. But it just plots the marked or flagged rows. Is there a way to overcome this? I want the black dots, and the other labels on the plot, but I do not want the black dot to show up on the legend, just want the labels in the legend.
Edit: I tried this, it works, but I am unable to set the color of the default black dots. Those dots appear in a new color (sorry, have some difficulty with colors)
Variables(X(x_col[1]), Y(y_cols[i]), Color(_files[1])),
Elements(Points(X, Y, Legend(28))),
Re: Adding custom marker and colors to GraphBuilder in JSLYou can right click on the dots to change the color:

You can also double click on the dots - then the Legends settings open -- where you can select which plots to show and which ones to hide.
