cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • JMP will suspend normal business operations for our Winter Holiday beginning on Wednesday, Dec. 24, 2025, at 5:00 p.m. ET (2:00 p.m. ET for JMP Accounts Receivable).
    Regular business hours will resume at 9:00 a.m. EST on Friday, Jan. 2, 2026.
  • We’re retiring the File Exchange at the end of this year. The JMP Marketplace is now your destination for add-ins and extensions.

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