Hi community!
For ages I had a script where I was drawing bivariate plots in a fit group, like so:
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
Y_Parameters = {"height", "weight"};
Fit Group(
Bivariate( Y(Eval(Y_Parameters) ), X( :age ) ),
<<{Arrange in Rows( 3 )}
);
Key thing here is - I get a list of parameters in a form of list of strings, and then plot them one by one.
Now I need to switch from Bivariate Plot to Graph Builder due to some features that Graph Builder has and Bivariate doesn't.
I figured out how to make the Graph Builder plot look exactly like Bivariate, but I cannot figure out if there is a simple way of drawing GBs in a Fit Group just like above. It looks like Fit Group can take GBs like so:
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
Y_Parameters = {"height", "weight"};
Fit Group(
Graph Builder(
Size( 480, 300 ),
Show Control Panel( 0 ),
Variables( X( :age ), Y(Eval(Y_Parameters[1]) ) ),
Elements( Points( X, Y( 1 ), Y( 2 ), Legend( 3 ) ) )
),
Graph Builder(
Size( 480, 300 ),
Show Control Panel( 0 ),
Variables( X( :age ), Y(Eval(Y_Parameters[2]) ) ),
Elements( Points( X, Y( 1 ), Y( 2 ), Legend( 3 ) ) )
),
<<{Arrange in Rows( 3 )}
)
But for arbitrary list of parameters I need to script it in a loop. I was hoping for something simpler like (obviously doesn't work):
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
Y_Parameters = {"height", "weight"};
Fit Group(
Graph Builder(
Size( 480, 300 ),
Show Control Panel( 0 ),
Variables( X( :age ), Y(Eval(Y_Parameters) ) ),
Elements( Points( X, Y( 1 ), Y( 2 ), Legend( 3 ) ) )
),
<<{Arrange in Rows( 3 )}
)
Any way for GB to take a list of parameters and output a list of DisplayBoxes?