How to export JMP graph to PPT by JSL?

Apr 26, 2017 9:13 AM(5355 views)

Hello, I am a new starter of JSL. I have managed to build box plots with local data filter (filted by dimension type) by JSL. And I want to export the box plots one dimension type by one dimension type (from the top of data filter to the bottom) to a powerpoint file. But I can not find the functions in JMP help file to make it happen.
Appreciate if someone can grant help. I just want to know what functions are helpful on this, so I can look them up in JSL help file for the detail.
Here is what I am trying to do...
--> 1. Import excel data to JMP table.
--> 2. Build box plots and local data filter(by dimension type, assuming I have 3 types A/B/C).
--> 3. Show box plot of dimension A, save it and export to first PPT slide.
--> 4. Automatically jump to dimension B, show box plot, save and export to second PPT slide.
--> 5. Same as last step to export box plot of dimension C to third PPT slide.
Thanks for reading.

Re: How to export JMP graph to PPT by JSL?

I fully understand what you are requesting. However, sometimes features that are available in JMP that are targeted for interactive usage, do not translate very well to the scripting world. The Local Data Filter is one of them. It is really a fantastic interactive tool, but in the script below, you will see that it's usage in a script, just makes the script more complex. And the interactive feature where the different values that are nicely displayed in the filter list, are not available from the filter when used in JSL.

Re: How to export JMP graph to PPT by JSL?

Names Default to Here( 1 );
// The open function below, just need to point to the .xls or .xlsx file you want to open
dt=open("$SAMPLE_DATA\Big Class.jmp");
// Run the Distribution Platform
dis=dt<<Distribution( stack(1),Continuous Distribution( Column( :height ) ),
// By using the "By" clause you avoid having to play around with
// the local data filter
By( :sex ) );
// Write the desired output to the ppt
report(dis[1])["height"]<<save presentation("$TEMP/jmp_example.pptx" );
report(dis[2])["height"]<<save presentation("$TEMP/jmp_example.pptx",append );
// OPen the powerpoint presentation
Open( "$TEMP/jmp_example.pptx" );

Re: How to export JMP graph to PPT by JSL?

Thanks for teaching me to use "save presentation()" to export charts to PPT. And this is real a good suggestion to use "By" instead of local data filter. However, in my case, I have to use graph builder to get box plots, which should not support "by" function. Moreover, actually I have dozens of dimensions, if I use "By" function, i may need to open dozens of charts at one time which looks not so good. Attached chart is basically what I want. Looking forward to your response. Thanks.

Re: How to export JMP graph to PPT by JSL?

Graph Builder does support "by" but it is hidden from the drag and drop interface. If one opens an empty Graph Builder window, their is a button called dialog. This will open the dialog version of Graph Builder which contains a By element.

Re: How to export JMP graph to PPT by JSL?

To keep charts from displaying while the code is running, but not having been written to the ppt, the "Invisible" option can be specified within the Platform. I have also added a way to handle your filtering so you can see an easy way to deal with that

I will also point out, that all of these options, etc. are documented and illustrated through examples @:

Re: How to export JMP graph to PPT by JSL?

Hi Jim, Thanks for your continuos coaching. Understand we can subset data by "Where". But the data(dimension) i am trying to filtrate has 26 values (from A to Z), so i want to find a easier way instead of repeatedly using 26 times "Where". What i can think of is local data filter.....I attached my filter fyr. All i want is to get a way to automatically scroll down the filter from A to Z, and output the corresponding 26x graphs to PPT. Till now, i still did not find in scripting index.

Re: How to export JMP graph to PPT by JSL?

I fully understand what you are requesting. However, sometimes features that are available in JMP that are targeted for interactive usage, do not translate very well to the scripting world. The Local Data Filter is one of them. It is really a fantastic interactive tool, but in the script below, you will see that it's usage in a script, just makes the script more complex. And the interactive feature where the different values that are nicely displayed in the filter list, are not available from the filter when used in JSL.