cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Try the Materials Informatics Toolkit, which is designed to easily handle SMILES data. This and other helpful add-ins are available in the JMP® Marketplace
Choose Language Hide Translation Bar
mmarchandTSI
Level V

How to remove graph image

In some cases, it's helpful to plot data over an image, or, more specifically, plot XY locations over an image and enable a graphlet of the pertinent data.  We can quickly associate the gathered data with visible aspects of our samples.  Adding an image to the graph is easy

frame << Add Image( image( img ), bounds( top( 600 ), left( 0 ), bottom( 0 ), right( 1200 ) ) )

and I do it a lot.  I am yet to find a way to remove or replace the image with another, say, through a filter change handler.  My current solution is to set up a window with my sample names.  When a sample is selected, the graph display window closes and is relaunched using the image associated with that sample.  I'd love to find a way to simply

frame << Remove Image

or something similar.  Not a dealbreaker, but it would improve the experience and simplify the script.  I'm on JMP 17.1.0.  Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
David_Burnham
Super User (Alumni)

Re: How to remove graph image

This seemed to work ... there might be a more elegant way:

 

cr = current report();
fb = cr[FrameBox(1)];
seg = fb << FindSeg( PictSeg( 1 ) );
seg << remove;

Interactively you can remove the image and the tool tip says it removes the PictSeg; so this code was inspired by the scripting index description of PictSeg.

-Dave

View solution in original post

5 REPLIES 5
David_Burnham
Super User (Alumni)

Re: How to remove graph image

This seemed to work ... there might be a more elegant way:

 

cr = current report();
fb = cr[FrameBox(1)];
seg = fb << FindSeg( PictSeg( 1 ) );
seg << remove;

Interactively you can remove the image and the tool tip says it removes the PictSeg; so this code was inspired by the scripting index description of PictSeg.

-Dave
hogi
Level XII

Re: How to remove graph image

Manually, you could remove the image via the right click menu: Image/Remove

hogi_0-1683906257354.png

 

mmarchandTSI
Level V

Re: How to remove graph image

I had overlooked this.  Interesting that the log doesn't capture anything when you remove the image this way.

hogi
Level XII

Re: How to remove graph image


@mmarchandTSI wrote:

... Interesting that the log doesn't capture anything when you remove the image this way.


The log is amazingly useful to learn JSL. But you cannot learn everything from the log:
The log provides a script to get B.

It doesn't capture how get get from A to B.

 

e.g. 

You can learn from the log how to generate a graph with a picture in the background - or a graph without such a picture:
just close the graph and the advanced log will show you a JSL script to generate the latest version.
No intermediate changes to the graph are captured. So, it's not possible to learn how a picture is removed.

There are many more steps which are not captured:
https://community.jmp.com/t5/JMP-Wish-List/Workflow-Builder-AddIns/idc-p/614232/highlight/true#M4043 

But there is no strict rule - Select matching Cells and Select Where are captured,  Select all rows is not captured.

 

mmarchandTSI
Level V

Re: How to remove graph image

Thanks!  This will make the script less jarring to use.  I'll have to remember to use the tooltips to my advantage.