Two graphs to single PowerPoint slideDoes anyone know how to send two graphs (3-D Surface Plots) to the same PowerPoint Slide? I know how to get one there, but I need two, side-by-side. I even know the size and position I want them on the slide, but I can't, for the life of me, figure out how to get them both there at one time. Using Journal removes the text boxes and legend that must be included.
Re: Two graphs to single PowerPoint slideHi thanks for the help last time.
I am still working on this..
Just curious if we can make a more flexible script where i have specific dimensions for my HLBox and VLBox but use a for loop to append each object of a report with n items. also n is not fixed thats why we need a loop.
biv = Bivariate(); //with n objects
nbiv = N items(biv);
myhlb = V List box();
myvlb = V List box();
for(i=1, i<=nbiv, i++,
myhlb << append( report( biv[i] ) ); //but only 3 objects appended at a time
myvlb << append( myhlb << get picture ); //and this one, only 2 objects appended at a time
);
goal is to have 3x2 objects per slide
is this possible?
Re: Two graphs to single PowerPoint slideOops....you are correct
Re: Two graphs to single PowerPoint slideoh thanks! by the way its just replace or append.
myhlb2 << save presentation( "C:\mypicture.pptx", append );Re: Two graphs to single PowerPoint slideRepeat the same process as before, with the 2 new objects you want to put together, but then when you go to Save the Presentation, specify to Append to the existing pptx
myhlb2 << save presentation( "C:\mypicture.pptx", Replace( Append) );
See documentation and an example in the Scripting Index
Help==>Scripting Index.........search on "Save Presentation"
Re: Two graphs to single PowerPoint slideHi,
I am having the same issue with getting graphs into presentation. this is very helpful. now what if you have more plots and need to put them on another slide?
Re: Two graphs to single PowerPoint slideWell, look at that! I clicked everywhere BUT there.
Now I discovered that I'm not getting the legend. The tree structure isn't helping me with that either. Sssigh! I can't seem to win with this option. A single Surface Plot is a piece of cake in comparison.
Thanks again, Jim!
Re: Two graphs to single PowerPoint slideTo show the Display Tree just right click on any outline box's gray trangle and select "Edit==>Show Tree Structure"
Re: Two graphs to single PowerPoint slideThanks again, Jim! I discovered that it was as simple as the sizing (more ratio than size) in the plot script that needed adjusting and now it works great.
I will most assuredly take your advice and read the Scripting Guide once the complerte tool I'm developing is prototype ready, which I believe it now is thanks to you. I tried to show the display tree for the surface plots, but I couldn't figure out how to do that. It appears to be a different method from displaying for other charts.
Re: Two graphs to single PowerPoint slideWhat you are missing, is that FrameBox(1) isn't always the object that needs to be changed. You need to read the section in the Scripting Guide on Display Trees. If you are using Surface Plots, then the size of the object needs to deal with SceneBox(1), and it isn't a "Size" mesage, but rather a "Height" and "Width" measurement.
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA\big class.jmp" );
sur=Surface Plot(
Columns( :age, :height, :weight ),
Datapoints Choice( "Points" ),
Surface Color Theme( "Green to Black to Red" ),
Surface Color Theme2( "Green to White to Red" ),
Surface Color Theme3( "White to Black" ),
Surface Color Theme4( "Blue to Gray to Red" ),
Response Column Color Theme( "Blue to Green to Red" ),
Response Column Color Theme2( "Spectral" ),
Response Column Color Theme3( "Jet" ),
Response Column Color Theme4( "White to Blue" ),
Response( :weight ),
Surface Color Method( "Solid", "Solid", "Solid", "Solid" ),
SetVariableAxis( :age, Axis Data( {} ) ),
SetVariableAxis( :height, Axis Data( {} ) ),
SetZAxis( weight, Current Value( 120 ) ),
SetXVariable( :age ),
SetYVariable( :height ),
Frame3D( Set Rotation( -54, 0, 38 ) )
);
report(sur)[scenebox(1)]<<HEIGHT></HEIGHT>Re: Two graphs to single PowerPoint slideThanks again, Jim!
In theory that works. For a general plot, works great. Would the fact that I'm producing 3D Surface Plots invalidate "Frame Size"? I'm getting the following error:
Cannot subscript Display Box in access or evaluation of 'Subscript' , Report( TippedSP )[/*###*/FrameBox( 1 )]
You've been a GREAT help today, I can't thank you enough!
- Wendy
Re: Two graphs to single PowerPoint slidetry this on for size
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA\big class.jmp" );
// Create the desired graphs
biv1 = bivariate( invisible, x( :age ), y( :height ) );
biv2 = bivariate( invisible, x( :age ), y( :weight ) );
report(biv1)[FrameBox(1)] << frame size(600,600);
report(biv2)[FrameBox(1)] << frame size(600,600);
// Create a holding object to place them into
myhlb = H List Box();
// Copy the objects into the holding object
myhlb << append( Report( biv1 ) );
myhlb << append( Report( biv1 ) );
// Create a second holding object to copy the picture
// of the complete first holding object
myhlb2 = H List Box();
// Copy the picture
myhlb2 << append( myhlb << get picture );
// Save the second holding object to the ppt
myhlb2 << save presentation( "C:\mypicture.pptx" );
Re: Two graphs to single PowerPoint slideOh, that's AWESOME! Works great. Now if you know how to get it to size to the slide in ppt, I'd be done!
Thank you SO much! One day I'll get the nuances of jsl better.
Re: Two graphs to single PowerPoint slideHere is an illustration of the concept that I am talking about. I have intentionally avoided using "New Window"s to illustrate how this all can be put together without popping up windows all over the place. If you want the display windows, you can just substitute them into the code
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA\big class.jmp" );
// Create the desired graphs
biv1 = bivariate( invisible, x( :age ), y( :height ) );
biv2 = bivariate( invisible, x( :age ), y( :weight ) );
// Create a holding object to place them into
myhlb = H List Box();
// Copy the objects into the holding object
myhlb << append( Report( biv1 ) );
myhlb << append( Report( biv1 ) );
// Create a second holding object to copy the picture
// of the complete first holding object
myhlb2 = H List Box();
// Copy the picture
myhlb2 << append( myhlb << get picture );
// Save the second holding object to the ppt
myhlb2 << save presentation( "C:\mypicture.pptx" );
Re: Two graphs to single PowerPoint slideThanks again, Jim! I now have a new window with the two graphs, and it looks perfect. However, my problems continue. This script produces multiple graphs that are inserted into the PowerPoint so I need to script what page each goes on *and* save each graph in a .png file. When I try to send this object (the two surface plots) to the .ppt, nothing happens. I've tried to send it to a report and I get errors every time.
I'm a novice still trying to wrap my head around jsl structure. With this problem I feel as I'm failing miserably. I can't send you the full code, but up to this point is successful. I've tried with and without the Repor() line. What am I doing wrong?
//Save Slot Width Production 3-D Surface Plots to picture
Report(TippedSP)[PictureBox(1)] << save picture((outputloc || char(dienum) || "_ProductionTippedSW.png"), png);
Report(TopViewSP)[PictureBox(1)] << save picture((outputloc || char(dienum) || "_ProductionTopSW.png"), png);
LeftSP = TippedSP << Get Picture;
RightSP = TopViewSP << Get Picture;
SlideSurfacePlot = new window(" Test ", h list box( LeftSP, RightSP ) ) << Get Picture;
Report(SlideSurfacePlot)[PictureBox(1)] << Save Picture((outputloc || char(dienum) || "_Production3DSurface.png"), png);
SlideSurfacePlot << Save Presentation(outputloc || "_" || char(dienum) || "_04-27-2017_" || DieType || "_" || CCondition ||"_Summary_Production.pptx", Insert(5), PNG); Re: Two graphs to single PowerPoint slideIf you place the 2 outputs into an H List Box(), you can then capture them into another object with a << get picture. The new object can be then saved to ppt
Re: Two graphs to single PowerPoint slideSorry...neglected that detail...using jsl. I'm developing a tool that produces multiple charts for production decision making and need two views of the same 3D surface plot on the same .pptx slide.
Re: Two graphs to single PowerPoint slideinteractively or by using JSL(script)Re: Two graphs to single PowerPoint slideAlternative approach (if you need to rearrange the plots anyway in poerpoint)
With a shortcut on the Graph Builder toolbar you can "throw" graphs and reports to Powerpoint
... and Powerpoint will insert the graph/report in the current slide of the current presentation.
New version should be available within the next few days:
Graph Builder Toolbar
