BookmarkSubscribeRSS Feed
Choose Language Hide Translation Bar

Community Member


Apr 14, 2019

Saving multiple distribution data in custom power point

Hi I am a moderate JMP user but I analyze certain data set frequently hence looking for automated way to save data directly to power point. I would like to check if there is a way to do it through JSL. 


I have .jrp file which has distributions, now I want to save that as power point but not using JMP Save as option. I want to customize and format the data saved in ppt through JSL. I have around 20-30 different distribution with Quantiles, if I do save as ppt option each distribution and quantiles makes total of 60-70 page of ppt. 


It is very cubersome and inefficient,  again to format ppt and make it in < 10 slides by reducing the plots and quantil tables.  Any help is greatly appriciated. 


Super User


Jul 25, 2016

Re: Saving multiple distribution data in custom power point

@JMPMODUSER you might want to search the JMP community for similar questions.


I suggest you read the-graph-size-exported-to-pptx-Save-Presentation  I like to use a freeware program called P3ICLI. It is described in that link.


Below is a modification of a script written for JSL Companion Applications of the JMP Scripting Language, Second Edition.

This script has 9 distribuions per page, 3 wide and 3 high. It uses the BKM (best known method) using only JMP: using display boxes, create a page, then get the picture to be saved to PPTX. Note there are nested Outline Boxes for tmpic, something currently required to get the outline titles on the bottom right. 


I find the need to scale to get what I want.  P3ICLI, you do not need to scale, you just create a layout template in Powerpoint, then use JSL to write the P3ICLI commands

Names Default to Here(1);

scaleit = Function( {w, h, fmt}, {wppi, hppi, scl},
  wppi = 13 * 96;
  hppi = 6.5 * 96;
  if(fmt=="Standard", wppi = 9.5 * 96);
  scl = Minimum( wppi/w, hppi/h, 1);

dt = open("$sample_data/semiconductor");

cnme = dt << get column names("Continuous", "string");
//use only the first 30;

cnme = cnme[1::30];
pw = 3;
ph = 3;
ppp = pw*ph;  //pictures per page

jjrn = New Window("My Journal", << Journal);

for(i=1, i<=nitems(cnme), i++,
    if(mod(i,ppp)==1, Try(lub << delete); lub=LineUpBox(ncol(floor(pw))));
    dist = dt << Distribution(
       Continuous Distribution(Invisible,
			Column( cnme[i] ),
			Summary Statistics( 0 ),
			Horizontal Layout( 1 ),
			Vertical( 0 ),
			Capability Analysis( 0 )
    lub << append(report(dist)[OutlineBox(2)] << clone box);
    dist << close window;
    //show(i, cnme[i]);
  	   i==ppp, //write the first page with ppp graphs
  	     tmpic = lub <<get picture;
  	     {w,h} = tmpic << get size;	        
         scl = scaleit(w, h, "Wide"); /*show(scl)*/
	     tmpic << Set Size( evalList({Round(w*scl,0), Round(h*scl,0)} ) );     
  		 obpic = OutlineBox("Page 1", OutlineBox("",(PictureBox(tmpic))) );
  		 obpic << Journal;
  	    If(mod(i,ppp)==0 | i==nitems(cnme), //write the next page of ppp
  	     tmpic = lub <<get picture;
  	     k = floor(i/ppp);
  	     {w,h} = tmpic << get size;	        
         scl = scaleit(w, h, "Wide"); /*show(scl)*/
  	     tmpic << Set Size( evalList({Round(w*scl,0), Round(h*scl,0)} ) );     
  		 obpic = OutlineBox("Page "|| char(k), OutlineBox("",(PictureBox(tmpic))) );
         obpic << journal;
); //end for i
jjrn <<Save Presentation("$TEMP/save6perpage.pptx", Outline Titles("BottomRight"), "PNG");
open ("$TEMP/save6perpage.pptx");

image.pngPage 1 of the PowerPoint document