the wrong way ...
Believe me, I did not generate the code below after learning JSL.
vice versa:
I created the code "with GraphBuilder" - now we can learn ...
Names Default to Here(1);
dt = Open( "$SAMPLE_DATA/Big Class Families.jmp" );
Graph Builder(
Size( 437, 413 ),
Summary Statistic( "Median" ),
Graph Spacing( 4 ),
Variables(
X( :height ),
Y( :name ),
Y( :weight ),
Y( :height, Position( 2 ) ),
Y( :age ),
Overlay( :sex )
),
Elements( Position( 1, 1 ), Points( X, Y, Legend( 89 ) ) ),
Elements(
Position( 1, 2 ),
Points( X, Y( 1 ), Y( 2 ), Legend( 1 ) ),
Smoother( X, Y( 1 ), Y( 2 ), Legend( 2 ) )
),
Elements( Position( 1, 3 ), Points( X, Y, Legend( 90 ) ) )
);
if there are just 2 items, there is no difference between adding a second entry - and adding a second entry as second.
Position(2) makes sense for three and more items. By default, the third item is added as third. If you want to do something else, you can add it to position(2).