Hi,
the "group X" option generates 2 plots, one for "F" and one for "M".
The option "First View Level" can be used to specify which "view" to start with , here: "M" (2nd view).
is there a JSL code to prgrammatically change the "view", something like
gr << Set X View Level (1)
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
gr = dt << Graph Builder(
Variables( X( :height ), Y( :weight ), Group X( :sex, N View Levels( 1 ),First View Level( 2 ) ) ),
Elements( Points( X, Y, Legend( 20 ) ), Smoother( X, Y, Legend( 21 ) ) )
);
The idea:
- selection of a data point is (in another graph) triggers the plot to show the respective subgroup
- the user still has the possibility to go to another subgroup
- in the giu, "X group" is much small than a local data filter
I'm not sure if this is only method, but you might have to manipulate Variables.
Here is one example, it first adds new grouping variable and then deletes variable in index 3 which in this case is the "old" grouping.</CODE></P>
<PRE><CODE class=" language-jsl">Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
gb = dt << Graph Builder(
Variables(X(:height), Y(:weight), Group X(:sex, N View Levels(1), First View Level(2))),
Elements(Points(X, Y, Legend(20)), Smoother(X, Y, Legend(21)))
);
gbb = Report(gb)[Graph Builder Box(1)];
wait(2);
//gbb << get variables;
gbb << Add Variable({:sex, Role("Group X"), Position(1), N View Levels(1), First View Level(1)});
gbb << Remove Variable(3);