cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • JMP Pro extension simulates Bayesian Optimization runs. Prediction formulas stand in for experimental results. Run simulations and compare results. Download and use the extension.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar

How to remove a variable in Graph builder

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();

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
hogi
Level XIII

Re: How to remove a variable in Graph builder

Works when you add an  inner position as well:

gb << Remove Variable( {:age, Role( "X" ), Position( 1 ), Inner Position(1)} );

hogi_0-1766742902076.png

 

View solution in original post

1 REPLY 1
hogi
Level XIII

Re: How to remove a variable in Graph builder

Works when you add an  inner position as well:

gb << Remove Variable( {:age, Role( "X" ), Position( 1 ), Inner Position(1)} );

hogi_0-1766742902076.png

 

Recommended Articles