great conversation : )
magnifier glass on the nuts and bolts of JSL ...
I just wondered about the difference between Variable() and Column Switcher() in
Variables( ... Y( as column(col1) ) ),
Column Switcher( col1, colList )
This one works as well:
Names Default to Here(1);
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
cols = dt << get column names( continuous );
col1= cols[1];
gb = dt << Graph Builder(
Size( 437, 413 ),
Graph Spacing( 4 ),
Variables( X(col1 ), ),
Elements( bar( X ), ),
Column Switcher( col1, cols )
);
as well as this one:
Names Default to Here(1);
dt = Open( "$SAMPLE_DATA/Big Class Families.jmp" );
cols = dt << get column names( continuous, "String" );
col1= cols[1];
gb = dt << Graph Builder(
Size( 437, 413 ),
Graph Spacing( 4 ),
Variables( X(Column(col1) ), ),
Elements( bar( X ), ),
Column Switcher( col1, cols )
);
what doesn't work:
Names Default to Here(1);
dt = Open( "$SAMPLE_DATA/Big Class Families.jmp" );
cols = dt << get column names( continuous, "String" );
col1= cols[1];
gb = dt << Graph Builder(
Size( 437, 413 ),
Graph Spacing( 4 ),
Variables( X(col1 ), ),
Elements( bar( X ), ),
Column Switcher( col1, cols )
);
so, Column Switcher() is fine with a String,
Variables() needs a name - or a column (created via As Column() or column())