topic Re: Save two graphs in one slide of presentation in Discussions
https://community.jmp.com/t5/Discussions/Save-two-graphs-in-one-slide-of-presentation/m-p/244556#M48185
<P>I think the issue is when you outline boxes inside outline boxes. I've tried that and saving to powerpoint gives mixed results. </P>Fri, 31 Jan 2020 18:04:46 GMTMathStatChem2020-01-31T18:04:46ZSave two graphs in one slide of presentation
https://community.jmp.com/t5/Discussions/Save-two-graphs-in-one-slide-of-presentation/m-p/243636#M48067
<P>Hello,</P><P>1. I want to know how to save two graphs into one slide of ppt. </P><P>Right now the my script is saving one graph per slide to ppt. </P><P>I need to compare two graphs in single slide. Also, i generate like 100 graphs for my data and having 100 slides in ppt makes hard to analyse. </P><P>2. how to scale my individuals graphs?</P><PRE><CODE class=" language-jsl">
//******************Open Data table***********************//
dt = Open( "$Downloads\Measure - Subset of JA63025.10A_raw_para_Stacked.jmp" );
//************************ Create new Columns to segregate the test names to group and plot graphs ***********************//
dt << New Column( "Test Number (MSB of Label)",
Character,
Nominal,
Formula( Num( Substr( :Label, Contains( :Label, ":p" ) - Num( 10 ), Contains( :Label, ":p" ) - Num( 6 ) ) ) )
);
dt << New Column( "Test Description", Character, Nominal, Formula( Substr( :Label, Contains( :Label, ":NVM_" ) + Num( 5 ), 100 ) ) );
dt << New Column( "NVM Parameter Name",
Character,
Nominal,
Formula( Substitute/*###*/(Substr( :Label, Contains( :Label, ":NVM_" ) + Num( 5 ), 100 ), "[1]", "") )
);
dt << New Column( "Measurements.",
Character,
Nominal,
Formula(
If( 16600 <= :Name( "Test Number (MSB of Label)" ) <= 16603,
Substitute( :Test Description, "[1]", "_BiasA_Pre_refcell_Erase" ),
If( 16629 <= :Name( "Test Number (MSB of Label)" ) <= 16632,
Substitute( :Test Description, "[1]", "_BiasA_Post_refcell_Erase" )
)
)
)
);
dt << New Column( "Measurements..",
Character,
Nominal,
Formula( If( 10100 <= :Name( "Test Number (MSB of Label)" ) <= 10103, Substitute( :Test Description, "[1]", "" ) ) )
);
dt << New Column( "Measurements...",
Character,
Nominal,
Formula(
If( 10100 <= :Name( "Test Number (MSB of Label)" ) <= 10103,
Empty(),
If( 16600 <= :Name( "Test Number (MSB of Label)" ) <= 16603,
Empty(),
If( 16629 <= :Name( "Test Number (MSB of Label)" ) <= 16632,
Empty(),
Substitute( :Test Description, "[1]", "" )
)
)
)
)
);
//*******************Plot Variability Charts****************************//
dtsum = Current Data Table();
colnames = dtsum << get column names( character );
Show( colnames );
//nw = New Window( "Plots", myVLB = V List Box() );
New Window( "Graphs",
For( i = 23, i <= N Items( colnames ), i++, // We have change i value based on the column where our modified column to plot graphs starts
gb = Variability Chart(
invisible,
Y( :Data ),
Y Scale( Left, Right ),
X( Column( colnames[i] ) ),
Analysis Type( "Choose best analysis (EMS REML Bayesian)" ),
Vertical Charts( 0 ),
Variability Summary Report( 1 ),
Std Dev Chart( 0 ),
Mean of Std Dev( 0 ),
Show Box Plots( 1 ),
Mean Diamonds( 1 ),
By( :NVM Parameter Name ),
);
);
//myVLB << append( Report( gb ) );
);
//**********************************Save Script to Data Table ************************//
dt << New script(
"Plots",
For( i = 23, i <= N Items( colnames ), i++, // We have change i value based on the column where our modified column to plot graphs starts
Variability Chart(
//invisible,
Y( :Data ),
Y Scale( Left, Right ),
X( Column( colnames[i] ) ),
Analysis Type( "Choose best analysis (EMS REML Bayesian)" ),
Vertical Charts( 0 ),
Variability Summary Report( 1 ),
Std Dev Chart( 0 ),
Mean of Std Dev( 0 ),
Show Box Plots( 1 ),
Mean Diamonds( 1 ),
By( :NVM Parameter Name ),
);
)
);
//*****************************************EXPORT GRAPHS TO PPT**********************************//
For( i = 23, i <= N Items( colnames ), i++, // We have change i value based on the column where our modified column to plot graphs starts
nn = dt << Variability Chart(
invisible,
Y( :Data ),
Y Scale( Left, Right ),
X( Column( colnames[i] ) ),
By( :NVM Parameter Name ),
Analysis Type( "Choose best analysis (EMS REML Bayesian)" ),
Vertical Charts( 0 ),
Variability Summary Report( 0 ),
Std Dev Chart( 0 ),
Mean of Std Dev( 0 ),
Show Box Plots( 1 ),
Mean Diamonds( 1 ),
);
If( i == 23,
nn << Save Presentation( "$Downloads/jmp_example2.pptx" ),
nn << Save Presentation( "$Downloads/jmp_example2.pptx", Append )
);
);
Open( "$Downloads/jmp_example2.pptx" );
</CODE></PRE>Wed, 29 Jan 2020 18:49:28 GMThttps://community.jmp.com/t5/Discussions/Save-two-graphs-in-one-slide-of-presentation/m-p/243636#M48067Rishabh2020-01-29T18:49:28ZRe: Save two graphs in one slide of presentation
https://community.jmp.com/t5/Discussions/Save-two-graphs-in-one-slide-of-presentation/m-p/243852#M48109
<P>Just a suggestion:</P>
<P>Stack the three Measurements columns and then make this figure in graph builder.</P>
<P>Its all the figures on one slide.</P>
<P> </P>
<P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Graph Builder.png" style="width: 999px;"><img src="https://kvoqx44227.i.lithium.com/t5/image/serverpage/image-id/21412i160B1ABA90F16681/image-size/large?v=1.0&px=999" title="Graph Builder.png" alt="Graph Builder.png" /></span></P>
<P> </P>Thu, 30 Jan 2020 15:49:04 GMThttps://community.jmp.com/t5/Discussions/Save-two-graphs-in-one-slide-of-presentation/m-p/243852#M48109Byron_JMP2020-01-30T15:49:04ZRe: Save two graphs in one slide of presentation
https://community.jmp.com/t5/Discussions/Save-two-graphs-in-one-slide-of-presentation/m-p/243907#M48115
<P>The method I use is to create the slides as I want them to be within JMP, and then copy them as pictures into a final display window, one picture object for each pptx page I want.</P>
<P>Below is a script that shows a simple example.</P>
<PRE><CODE class=" language-jsl">Names default to here(1);
dt=Open("$SAMPLE_DATA/big class.jmp");
// Create the 2 graphs
fg = dt << Fit Group(
Oneway(
Y( :height ),
X( :sex ),
SendToReport(
Dispatch( {}, "Oneway Plot", FrameBox, {Frame Size( 463, 305 )} )
)
),
Oneway(
Y( :weight ),
X( :sex ),
SendToReport(
Dispatch( {}, "Oneway Plot", FrameBox, {Frame Size( 463, 305 )} )
)
),
<<{Arrange in Rows( 1 )}
);
// Place the graphs into a single picture
nw=new window("The Picture", report(fg)[outlinebox(1)]<<get picture);
fg<<close window;
// Save the single picture to pptx
nw<<save presentation("$TEMP/thepicture.pptx");
open("$TEMP/thepicture.pptx");</CODE></PRE>Thu, 30 Jan 2020 16:22:11 GMThttps://community.jmp.com/t5/Discussions/Save-two-graphs-in-one-slide-of-presentation/m-p/243907#M48115txnelson2020-01-30T16:22:11ZRe: Save two graphs in one slide of presentation
https://community.jmp.com/t5/Discussions/Save-two-graphs-in-one-slide-of-presentation/m-p/244538#M48179
<P>Jim, I was thinking the same thing, but, like in this case what if you don't know how many graphs there will be ahead of time. How would you go about making n pairs of graphs?</P>Fri, 31 Jan 2020 16:46:18 GMThttps://community.jmp.com/t5/Discussions/Save-two-graphs-in-one-slide-of-presentation/m-p/244538#M48179Byron_JMP2020-01-31T16:46:18ZRe: Save two graphs in one slide of presentation
https://community.jmp.com/t5/Discussions/Save-two-graphs-in-one-slide-of-presentation/m-p/244546#M48181
<P>How I typically handle this, is to have the script create the paired picture objects as they are being created. And then append them to the journal. So in the above case where multiple Variability Charts are being created, I would create a V List Box() or H List Box for loop iteration 1 and append the first iteration graph into the List Box(), and then in iteration loop 2, I would append the output into the List Box, and then copy a picture of the List Box to the journal window, and then delete the List Box(), and start over for iteration 3, etc.</P>
<P> </P>
<P>One could also query the Journal after all of the Variability Charts are there, using XPath, and find out the number of Outline Boxes, and from there build your pairs and place them into a new journal window that can be your final Save Presentation output</P>
<P> </P>
<P>And I am sure other methods are being used</P>Fri, 31 Jan 2020 17:16:34 GMThttps://community.jmp.com/t5/Discussions/Save-two-graphs-in-one-slide-of-presentation/m-p/244546#M48181txnelson2020-01-31T17:16:34ZRe: Save two graphs in one slide of presentation
https://community.jmp.com/t5/Discussions/Save-two-graphs-in-one-slide-of-presentation/m-p/244549#M48182
<P>What would be great is a display object (maybe call it "slidebox()"? ) that you can put display objects inside of it, and then everything in that container box is treated as one slide (or one page). </P>Fri, 31 Jan 2020 17:27:14 GMThttps://community.jmp.com/t5/Discussions/Save-two-graphs-in-one-slide-of-presentation/m-p/244549#M48182MathStatChem2020-01-31T17:27:14ZRe: Save two graphs in one slide of presentation
https://community.jmp.com/t5/Discussions/Save-two-graphs-in-one-slide-of-presentation/m-p/244553#M48184
<P>I actually think that functionality is already there. I use Outline Boxes most of the time as your SlideBox(). I just build the outputs as I need them, and then place them into an Outline Box() and then append them to the Journal I am building. The Outline Box() is chosen, because of the way JMP handles outline boxes with pptx files. The Outline Box() title becomes the title of the slide, and the "picture" I have placed into the outline box() becomes the content of the slide.</P>
<P> </P>
<P>Yes there could be some defaults set for a "SlideBox()" that might make it easier, but most of the time, the combinations of objects that I put together require multiple H List Boxes, V List Boxes, Lineup Boxes, etc to get the display as I want it.</P>Fri, 31 Jan 2020 17:39:12 GMThttps://community.jmp.com/t5/Discussions/Save-two-graphs-in-one-slide-of-presentation/m-p/244553#M48184txnelson2020-01-31T17:39:12ZRe: Save two graphs in one slide of presentation
https://community.jmp.com/t5/Discussions/Save-two-graphs-in-one-slide-of-presentation/m-p/244556#M48185
<P>I think the issue is when you outline boxes inside outline boxes. I've tried that and saving to powerpoint gives mixed results. </P>Fri, 31 Jan 2020 18:04:46 GMThttps://community.jmp.com/t5/Discussions/Save-two-graphs-in-one-slide-of-presentation/m-p/244556#M48185MathStatChem2020-01-31T18:04:46ZRe: Save two graphs in one slide of presentation
https://community.jmp.com/t5/Discussions/Save-two-graphs-in-one-slide-of-presentation/m-p/244557#M48186
<P>The key to this, is that all outline boxes that are within the outline box, have to be copied in as one picture. You need to create your desired page using whatever structure you need, and the final step, is to append that desired page using << get picture, into the outline box you are going to << Save Presentation from.</P>Fri, 31 Jan 2020 22:09:07 GMThttps://community.jmp.com/t5/Discussions/Save-two-graphs-in-one-slide-of-presentation/m-p/244557#M48186txnelson2020-01-31T22:09:07ZRe: Save two graphs in one slide of presentation
https://community.jmp.com/t5/Discussions/Save-two-graphs-in-one-slide-of-presentation/m-p/244744#M48196
<P>Very good point. That's not something that's implicitly obvious, Thanks</P>Fri, 31 Jan 2020 21:49:28 GMThttps://community.jmp.com/t5/Discussions/Save-two-graphs-in-one-slide-of-presentation/m-p/244744#M48196Byron_JMP2020-01-31T21:49:28Z