cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
JMP is taking Discovery online, April 16 and 18. Register today and join us for interactive sessions featuring popular presentation topics, networking, and discussions with the experts.
Choose Language Hide Translation Bar
natalie_
Level V

How can I remove an entire legend from a plot?

Hi everyone,

I have three plots, and one of the plots has over a thousand lines on it.  I would like to remove the legend from the overlay plot.  How can I do that with and without using JSL?

Thank you.

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: How can I remove an entire legend from a plot?

Natalie,

Any platform output components can be deleted.  If there is not an option specified under the red triangles to get rid of it, then a message can be sent to the platform's report output to delete the legend.

Here is a sample:

Names default to here(1);

dt=open("$SAMPLE_DATA\Semiconductor Capability.jmp");

ov=dt<<Overlay Plot( X( :PNP1 ), Y( :NPN1, :PNP2 ), Y Scale( Left, Right ) );

report(ov)[PictureBox(3)]<<delete;

To see the "Tree Structure" for the output, rt mouse click on the "Gray" triangle left of the red triangle, and select Edit==>Show Tree Structure.

There you will see all of the output objects for your graph.

Jim

View solution in original post

5 REPLIES 5
txnelson
Super User

Re: How can I remove an entire legend from a plot?

Natalie,

Any platform output components can be deleted.  If there is not an option specified under the red triangles to get rid of it, then a message can be sent to the platform's report output to delete the legend.

Here is a sample:

Names default to here(1);

dt=open("$SAMPLE_DATA\Semiconductor Capability.jmp");

ov=dt<<Overlay Plot( X( :PNP1 ), Y( :NPN1, :PNP2 ), Y Scale( Left, Right ) );

report(ov)[PictureBox(3)]<<delete;

To see the "Tree Structure" for the output, rt mouse click on the "Gray" triangle left of the red triangle, and select Edit==>Show Tree Structure.

There you will see all of the output objects for your graph.

Jim
natalie_
Level V

Re: How can I remove an entire legend from a plot?

Thank you so much Jim!

I like the Tree Structure.  This will be very useful.

Devin
Level I

Re: How can I remove an entire legend from a plot?

Hi Jim - The last command to delete isn't running for me in JMP16.1  : any clues? I don't even see a legend generated in the first 3 lines, so maybe JMP now has a legend limit that triggers deletion?  

 

Names default to here(1);

dt=open("$SAMPLE_DATA\Semiconductor Capability.jmp");

ov=dt<<Overlay Plot( X( :PNP1 ), Y( :NPN1, :PNP2 ), Y Scale( Left, Right ) );

report(ov)[PictureBox(3)]<<delete;

natalie_
Level V

Re: How can I remove an entire legend from a plot?

Hi Jim,

When I open up my old reports, the legend is added back in.  Is there a way to permanently delete?

txnelson
Super User

Re: How can I remove an entire legend from a plot?

Natalie,

Unless there is a Preference setting for the particular platform that is being run in your report, that turns off the legend display

     File==>Preferences==>Platforms

there is not a global way to turn off the displaying of the legend.  If you have save .jrp files that you are running, you will need to go to those files, change their extension to .jsl, open them up in the script editor, and modify the scripts to delete the legend.  Then go back and change the extension back to .jrp.

Jim