BookmarkSubscribeRSS Feed
Choose Language Hide Translation Bar

Community Member


Apr 8, 2012

Save Picture by column value?

Hello - I'm trying to write a script that will save pictures titled by a value in a column, however, when I do this, JMP seems to overwrite the same file with each column value and only leaves me with the last one.  That is, if I plot a distribution by the column of interest, I get the display box to include each of the plots I want, separated by the value of interest in the column.  However, I can't seem to get it to save each individual plot.

Code I have is:

db = Distribution(...  ),

  By( :PropertyOfInterestInColumn )


db << Save Picture( Concat( PropertyOfInterestInColumn, "filename.png" ) );



Super User


Jun 23, 2011

Re: Save Picture by column value?

You need to address each subplot separately. Here's an example using a FOR-loop. The example saves two different pictures for each level, the first includes the entire distribution output, incl. tables´boxes with moments etc., the other includes the plot only.

dt = Open( "$ENGLISH_SAMPLE_DATA/Big" );


db=Distribution( Continuous Distribution( Column( :height ) ), By( PropertyOfInterestInColumn) );

// get a list of the levels in "PropertyOfInterestInColumn"


// Save each level as .png

for(i=1, i<=nitems(g), i++,

db[i] << Save Picture( Concat( g[i], "_filename.png" ) );

report(db[i])[1,1,1,1] << Save Picture( Concat( g[i], "_plot.png" ) );