change markers for selected points in a graph using JSLI need to highlight some selected points on a plot. I can select them, but the selection does not show on saved plots, so as alternative, I want to change the markers of the selected points (i.e. rows).
It's probably just one line, but can't figure out how to do that. Could somebody advise, please?
Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
Graph Builder(
Variables( X( :height ), Y( :weight )),
Show Control Panel( 0 ),
);
dt << Select Where (:sex == "F");
//now I want to change the marker for the selected dataAutomation and ScriptingData Exploration and VisualizationRe: change markers for selected points in a graph using JSLYou can send the <
dt << Markers( "triangle" );
Re: change markers for selected points in a graph using JSLYou have to save the selection as 0/1 into a column *) - and use that column as Overlay.
In your case, you can directly use SEX as Overlay.
* in the video I used the shortcut key from the Quickselect Toolbar . As an alternative,you can Name Selection in Column from the Rows/Row Selection menu,
Re: change markers for selected points in a graph using JSLOne major disadvantage of this approach is that: Overlay is often used for another purpose.
If you would like the option to use Overlay by multiple columns , please follow the wish and vote!
Another option:
Via right click - assign a Row State/Marker to the selected columns.

The disadvantage of this approach: row states are static, they don't adapt interactively to the current data!
Re: change markers for selected points in a graph using JSLThanks @hogi, that's an interesting feature. Here though, I was looking for a JSL solution (which @mmarchandFSLR provided).
Re: change markers for selected points in a graph using JSL@mmarchandFSLR
Is there a similar way to change the size of the markers? Simply adding
Based on the example in the Scripting Index I tried a few approaches. The version below selects the right markers, but changes the size of all markers, not just the selected ones.
Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
gb = Graph Builder(
Variables( X( :height ), Y( :weight )),
Show Control Panel( 0 ),
);
dt << Select Where (:sex == "F");
rbiv = gb << report;
//rbiv << Select Where (:sex == "F");
framebox = rbiv[Frame Box( 1 )];
//framebox << Select Where (:sex == "F");
framebox << Marker Size( 7 );
dt << Marker Size( 7 );Re: change markers for selected points in a graph using JSLcalculate a SIZE column from your selection (0/1) and use it as size in Graph Builder. Then you get different sizes for selected and non-selected points.