cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMP® Marketplace featured Capability Explorer add-in
Choose Language Hide Translation Bar
DMR
DMR
Level V

How to Remove Multiple Reference Lines

Hi,

I've got a chart created using the Graph Builder, to which I've added multiple reference lines on the Y axis via a scripted interactive dialog. I now want to include a "Start Over" button which removes them all.  I know I could delete them individually by referring to the same values on the Y axis that were used to create them in the first place, e.g.

 

axisbox << Add Ref Line( 90, "Dashed", blue );
axisbox << Remove Ref Line( 90 );

 

The problem is that because of the way they've been created, I don't know what the exact values actually are - and I therefore want to be able to clear them all without needing to refer to all the Y values in turn.  I know I found a way to do this some time way back - and it was very simple - but I've forgotten how I did it.  Can anybody tell me how it can be done?

1 ACCEPTED SOLUTION

Accepted Solutions
ian_jmp
Level X

Re: How to Remove Multiple Reference Lines

Depending on whether or not you have made other changes you wish to keep, this might do it:

Names Default To Here( 1 );
Open( "$SAMPLE_DATA/Big Class.jmp" );
biv = Bivariate( Y( :weight ), X( :height ), FitLine );
rbiv = biv << report;
axisbox = rbiv[axis box( 1 )];
axisbox << Add Ref Line( 90, "Dashed", blue );
axisbox << Add Ref Line( 100, "Dashed", blue );
axisbox << Add Ref Line( 110, "Dashed", blue );
Wait(2);
axisbox << Revert Axis;

View solution in original post

2 REPLIES 2
ian_jmp
Level X

Re: How to Remove Multiple Reference Lines

Depending on whether or not you have made other changes you wish to keep, this might do it:

Names Default To Here( 1 );
Open( "$SAMPLE_DATA/Big Class.jmp" );
biv = Bivariate( Y( :weight ), X( :height ), FitLine );
rbiv = biv << report;
axisbox = rbiv[axis box( 1 )];
axisbox << Add Ref Line( 90, "Dashed", blue );
axisbox << Add Ref Line( 100, "Dashed", blue );
axisbox << Add Ref Line( 110, "Dashed", blue );
Wait(2);
axisbox << Revert Axis;
DMR
DMR
Level V

Re: How to Remove Multiple Reference Lines

That's the one. I've just searched my library of scripts for "<< Revert Axis", and tracked down my own elusive example in less than two seconds

 

Thanks Ian!