cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Don’t miss your chance to experience Discovery Summit Europe at our best available rate! Early bird registration through 31 Oct.
  • Graph Builder Toolbar streamlines interactive graphing. Creates shortcuts on Report and GraphBuilder Helpers toolbars. Download and install the extension.
  • JMP will suspend normal business operations for our Rest and Recharge Day on Friday, October 2, 2026.
    Regular business hours will resume on Monday, October 5, 2026.

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