Subscribe Bookmark RSS Feed

How can I remove an entire legend from a plot?

natalie_

Community Trekker

Joined:

Jan 6, 2016

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
Solution

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
4 REPLIES
Solution

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_

Community Trekker

Joined:

Jan 6, 2016

Thank you so much Jim!

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

natalie_

Community Trekker

Joined:

Jan 6, 2016

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

Joined:

Jun 22, 2012

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