cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Browse apps to extend the software in the new JMP Marketplace
Choose Language Hide Translation Bar
ReneeBay
Level II

Help with a script created from graph builder: value ordering/sorting and image export

Hello,

Is there anyone with fairly comprehensive JSL/JMP skills willing to look at a script I have exported and modified slightly from what I created in graph builder?

 

There have been helpful folks trying to answer my questions piece-meal, but once I fall of the radar so to speak, I can't seem to resolve all of my issues. I think if I had even one person with skills to look at what I've done so far and what issues I'm having, they would probably resolve it quickly. I've been trying to go through the scripting guide and google searching with key words (for instance, after finding a tip about using the Enhanced Log I found a couple of easy errors to fix), but I just don't think I have the skills to accomplish a couple of other things successfully in a reasonable amount of time while also having a lot of graphs to make.

 

Attached is a PDF of my script so far with what the graphs looks like.

This is the script based on bar graphs I’ve already made with some modifications produces the following graph (note- at the bottom of the attachment is a screen capture of the script that shows an easier structure to read)…

 

Thanks so much for any help!

2 REPLIES 2
jthi
Super User

Re: Help with a script created from graph builder: value ordering/sorting and image export

Using Big Class as example dataset. This script should get you maybe going:

Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");

gb = dt << Graph Builder(
	Size(569, 466),
	Show Control Panel(0),
	Variables(X(:name), Y(:weight), Group Y(:sex)),
	Elements(Points(X, Y, Legend(4)))
); //by default F is top in Sex
wait(2);
//add Value orders column property first manually, then right click and copy column properties

Column(dt, "sex") << Add Column Properties(
	Set Property("Value Order", {Custom Order({"M", "F"}), Common Order(0)})
);


//jmp high quality graphics:
//https://community.jmp.com/t5/JMPer-Cable/Getting-high-quality-graphics-out-of-JMP/bc-p/425162#M656

rep = gb << report;
rep << Save Picture("$TEMP/test.emf", "emf");
rep << Save PDF("$TEMP/test.pdf");

Open("$TEMP");
-Jarmo
ReneeBay
Level II

Re: Help with a script created from graph builder: value ordering/sorting and image export

Hello!

 

Thanks so much! I'm well on my way to a more automated graphing experience now, but just a couple of other follow up questions:

 

1) Just want to confirm that I will have to manually set the Value Ordering in the JMP data table before the script will successfully recognize the changes? If so, that's not a big deal. I assume the scripting to force this without having to modify the data table is probably too complicated for me for now...

 

2) For exporting the graphic, do you know of good links with basic script that allows me to adjust the page width and orientation of the output? The default for PDF seems to be 8.5x11, portrait and so splits the graphs to 2 pages. It seems something like 17x11, landscape would work (based on exporting the PDF from Graph Builder).

 

Thanks again!