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

How to set size graph export to PPT by JSL

Hello, I am a beginer of jsl . I have one question about set picture size and save to PPT from example jsl script below. ( currently I use 'Save presentation' command to export charts or pictures to powerpoint but I'm struggling with how to manage picture size in powerpoint by JSL )

Not sure Is there anyway to adjust picture size in ppt file using JSL or not?

Best regards,

Names Default To Here( 1 );

originalImg = New Image( "$SAMPLE_IMAGES/tile.jpg" );

img = New Image( "$SAMPLE_IMAGES/tile.jpg" );

imgSize = 800;

img << Set Size( {imgSize, imgSize} );

GG=New Window( "Test",

V List Box(
pb = Picture Box( img )

)

);



GG << Save Presentation( "$TEMP/jmp_example.pptx" );
Open( "$TEMP/jmp_example.pptx" );



imgSize = 100;

img << Set Size( {imgSize, imgSize} );

GG=New Window( "Test",

V List Box(
pb = Picture Box( img )

)

);



GG << Save Presentation( "$TEMP/jmp_example.pptx",append );
Open( "$TEMP/jmp_example.pptx" );

2019-02-26 15_28_54-jmp_example - PowerPoint.jpg

1 ACCEPTED SOLUTION

Accepted Solutions
gzmorgan0
Super User (Alumni)

Re: How to set size graph export to PPT by JSL

@Jet00 I have been able to change sizes by setting a framebox size.  Try the script below, and determine if the sizes are changing for you.

 

This question has been asked several times. You might want to reference this earlier blog

 https://community.jmp.com/t5/Discussions/the-graph-size-exported-to-pptx-Save-Presentation/m-p/72135

 

 

Names Default To Here( 1 );

New Window( "Box Plot Seg Example",
	g = Graph Box( Frame Size( 451, 451 ) )
);
g[FrameBox( 1 )] << Add Image(Open(Convert File Path("$SAMPLE_IMAGES/tile.jpg")),
	Bounds(Left(0), Right(100), Top(100), Bottom(0)),
	SetSize({100,100})
);

g[AxisBox( 2 )] << delete;
g[AxisBox( 1 )] << delete;
g[FrameBox(1)] << Framesize(450,450);
g << Save Presentation( "$TEMP/jmp_example.pptx" );

g[FrameBox(1)] << Framesize(150,150);
g<< Save Presentation( "$TEMP/jmp_example.pptx",append );

g[FrameBox(1)] << Framesize(75,75);
g<< Save Presentation( "$TEMP/jmp_example.pptx",append );


g[FrameBox(1)] << Framesize(25,25);
g<< Save Presentation( "$TEMP/jmp_example.pptx",append );


Open( "$TEMP/jmp_example.pptx" );

The earlier blog clearly states my (and my co-author's opinion) that PowerPoint scaling is a mystery.  The earlier blog references a script written for our book. My best known strictly JMP method is to create a display box scaled to your powerpoint page size, and save pictures and reports to the scale you need (maybe just one little corner of the pagesized display) then use save presentation. That allows you to save multiple graphs on a single page.

 

image.png

I did not attach the script referenced in the link above, since the script builds on a complex example, and is too complex for this blog. The example creates a custom title and counts pages and saves 8 regression reports per page. But it uses our recommended method of:

  • Create a window that is a journal  New Window("name", << Journal);
  • For each page, append all planned objects in a properly scaled window
  • Get Picture for that window
  • Journal, that picture.
  • Then use Save presentation for that journal.  

There is a little more to it, but that is the gist.

Hope the script above helps you.

 

View solution in original post

2 REPLIES 2
gzmorgan0
Super User (Alumni)

Re: How to set size graph export to PPT by JSL

@Jet00 I have been able to change sizes by setting a framebox size.  Try the script below, and determine if the sizes are changing for you.

 

This question has been asked several times. You might want to reference this earlier blog

 https://community.jmp.com/t5/Discussions/the-graph-size-exported-to-pptx-Save-Presentation/m-p/72135

 

 

Names Default To Here( 1 );

New Window( "Box Plot Seg Example",
	g = Graph Box( Frame Size( 451, 451 ) )
);
g[FrameBox( 1 )] << Add Image(Open(Convert File Path("$SAMPLE_IMAGES/tile.jpg")),
	Bounds(Left(0), Right(100), Top(100), Bottom(0)),
	SetSize({100,100})
);

g[AxisBox( 2 )] << delete;
g[AxisBox( 1 )] << delete;
g[FrameBox(1)] << Framesize(450,450);
g << Save Presentation( "$TEMP/jmp_example.pptx" );

g[FrameBox(1)] << Framesize(150,150);
g<< Save Presentation( "$TEMP/jmp_example.pptx",append );

g[FrameBox(1)] << Framesize(75,75);
g<< Save Presentation( "$TEMP/jmp_example.pptx",append );


g[FrameBox(1)] << Framesize(25,25);
g<< Save Presentation( "$TEMP/jmp_example.pptx",append );


Open( "$TEMP/jmp_example.pptx" );

The earlier blog clearly states my (and my co-author's opinion) that PowerPoint scaling is a mystery.  The earlier blog references a script written for our book. My best known strictly JMP method is to create a display box scaled to your powerpoint page size, and save pictures and reports to the scale you need (maybe just one little corner of the pagesized display) then use save presentation. That allows you to save multiple graphs on a single page.

 

image.png

I did not attach the script referenced in the link above, since the script builds on a complex example, and is too complex for this blog. The example creates a custom title and counts pages and saves 8 regression reports per page. But it uses our recommended method of:

  • Create a window that is a journal  New Window("name", << Journal);
  • For each page, append all planned objects in a properly scaled window
  • Get Picture for that window
  • Journal, that picture.
  • Then use Save presentation for that journal.  

There is a little more to it, but that is the gist.

Hope the script above helps you.

 

Jet00
Level I

Re: How to set size graph export to PPT by JSL

Thank you for answer very useful.