Hello,
I am trying in the script below to remove the variable age in the X axis but I can't achieve to remove it this way, does anyone had the same issue ?
Note: I know I could remove it with Remove variable(index) but I don't know in advance if this variable is in the graph, so I want to avoid accidentally deleting another graph via the index.
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
gb = Graph Builder(
Size( 528, 464 ),
Show Control Panel( 0 ),
Variables( X( :sex ), X( :age, Position( 1 ) ), Y( :height ), Color( :sex ) ),
Elements( Points( X( 1 ), X( 2 ), Y, Legend( 17 ) ) )
);
wait(2);
gb << Remove Variable( {:age, Role( "X" ), Position( 1 )} );
gb << get variables();