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
bellesabi
Level I

How can I retrieve a script from an already existing graph

Hello,

I've been searching every where, I cannot seem to find a solution to my problem.

The user opens a datatable and creates all the graphes he needs and the idea is to be able to write a script that will save the picture of each graph individually in a folder on my computer.

I had difficulties first finding a way to select each graph one after another (but that seems possible by saving all the graphs on a journal).

Once all my graphs are on the journal I manage to refer to each buttonbox but I cannot seem to find a way to access the script of the graph present for each button box (to add a line <<save picture("name of graph.jpg",JPEG) )

What am I missing?

Thank you,

Isabelle

5 REPLIES 5
gutloja
Level III

Re: How can I retrieve a script from an already existing graph

Hello, Bellesabi.

Perhaps I am simplifying your question, but for a few graphs, I simply do this:

9414_Screen Shot 2015-08-05 at 12.44.26 PM.png

Then press "Shift + CMD + N" [In a Mac] to open a New Script Editor, and paste the script, then save the script on a master document for further editing.

There is also the option "Save Script to Data Table", also useful.

I would love to know if there is a way to export as ".jpeg", in File>Export, I only see the following options:9415_Screen Shot 2015-08-05 at 12.48.12 PM.png

-Jose

ryandewitt
Community Manager Community Manager

Re: How can I retrieve a script from an already existing graph

To add to this...It appears you're using JMP for Mac if you're Exporting. I'm using JMP for Windows which has a jpeg option, however it's under File>Save As not Export like on a Mac, an OS differenceI've found .pngs are pretty universal and highly beneficial if you need transparency, and is my go to graphic output. 

If your goal is a presentation, you can quickly use the large plus + tool to highlight a graph, right-click and copy then paste into your presentation or doc and repeat. If your goal is editing, retrieval or combination scripts, as nicely mentioned above you can copy a script or use red triangle Save Script to Data Table then Edit that script.  Thanks for helping out guys.

Ryan DeWitt - JMP User Enablement | Creative • Video • Design • Learning

Re: How can I retrieve a script from an already existing graph

Hi Isabelle,

First you can find the script for each graph by clicking the red triangle associated with the graph produced. Or if the graph has already been produced by someone else and once it JMP, you should be able to follow the same procedure to access the scripts for each graph. In the example below, I used the animal sample data and ran a distribution analysis on animal species by season.

9412_Script-Copy Script.jpg

Jenkins Macedo
bellesabi
Level I

Re: How can I retrieve a script from an already existing graph

Hello,

Thank you for both the tips.

But I was looking for an automatic solution (I have a lot of graphs for which I have to do that)....

ian_jmp
Staff

Re: How can I retrieve a script from an already existing graph

If I understand correctly, this code fragment may help. It will save the contents of all currently open reports (to the Desktop):

NamesDefaultToHere(1);

w = Window();

for(i = 1, i<=NItems(w), i++,

  winTitle = w[i] << getWindowTitle;

  if((w[i] << windowClassName) == "Report", w[i] << savePicture("$DESKTOP/"||winTitle, PNG));

);