cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Learn how to build custom Python data connectors and further customize JMP’s Data Connector Framework with the Python Data Connector Demo, available now in the JMP Marketplace!
  • See how to create experiments to support product design and ID useful product features. Register for June 12 webinar, 2pm US Eastern Time.

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