cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
JMP is taking Discovery online, April 16 and 18. Register today and join us for interactive sessions featuring popular presentation topics, networking, and discussions with the experts.
Choose Language Hide Translation Bar
Thierry_S
Super User

Save Presentation > H List Box Placement: How to leave some space at the top of each slide (see testing script)?

Hi JMP Community,

 

I have a apparently simple problem that I have not been able to resolve: I building a simple script to gather plots from different journals into single slides in a PowerPoint presentation. So far, things are working well except that the plots are all stuck at the top of each slide -> what is the best way to include a Spacer in my H List Box or my Lineup Box to avoid this problem?

 

Names Default to Here (1);

dummy = H List Box ();

dummy << Save Presentation ("$Desktop/TEMP PNG/Z1.pptx", Outline Titles (Top Left));

jrn1 = Get Window("FIRST_JOURNAL");
jrn2 = Get Window("SECOND_JOURNAL");

For (i = 1, i <=5, i++, 
	Plot1 = jrn1 [PictureBox(i)];
	Plot2 = jrn2 [PictureBox(i)];

	MylpBox = Lineup Box (N Col (2));
	MylpBox << Append (Plot1);
	MylpBox << Append (Plot2);

	myhlb = H List Box ();
	myhlb << Append (Spacer Box (0,1)); // this does not work
	myhlb << Append (MylpBox << get picture);
	myhlb << Save Presentation ("$Desktop/TEMP PNG/Z1.pptx", append, Outline Titles (Top Left));
	
);	

Thank you for your help.

TS

 

 

Thierry R. Sornasse
1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: Save Presentation > H List Box Placement: How to leave some space at the top of each slide (see testing script)?

Here is a simple example of how I do the spacing you are looking for

Names Default To Here( 1 );

Open( "$SAMPLE_DATA/big class.jmp" );

// Create the output you need
biv = bivariate( x( :height ), y( :weight ) );
plot1 = Report( biv );

// Create a display area with the spacer box in it 
vlb = V List Box( nn = V List Box( Spacer Box( size( 1, 50 ) ) ) );

// add in the part of the display that you want to be lower
nn << append( plot1[Picture Box( 1 )] );

// Add the display area to the outline box that has the title 
plot1[Outline Box( 1 )] << prepend( vlb << get picture );

// Delete the area of the display that you have turned
// into a picture object and placed it just below the outline box
plot1[Picture Box( 1 )] << delete;

plot1 << Save Presentation( "$TEMP/Z1.pptx", append, Outline Titles( Top Left ) );


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

space.PNG

Jim

View solution in original post

1 REPLY 1
txnelson
Super User

Re: Save Presentation > H List Box Placement: How to leave some space at the top of each slide (see testing script)?

Here is a simple example of how I do the spacing you are looking for

Names Default To Here( 1 );

Open( "$SAMPLE_DATA/big class.jmp" );

// Create the output you need
biv = bivariate( x( :height ), y( :weight ) );
plot1 = Report( biv );

// Create a display area with the spacer box in it 
vlb = V List Box( nn = V List Box( Spacer Box( size( 1, 50 ) ) ) );

// add in the part of the display that you want to be lower
nn << append( plot1[Picture Box( 1 )] );

// Add the display area to the outline box that has the title 
plot1[Outline Box( 1 )] << prepend( vlb << get picture );

// Delete the area of the display that you have turned
// into a picture object and placed it just below the outline box
plot1[Picture Box( 1 )] << delete;

plot1 << Save Presentation( "$TEMP/Z1.pptx", append, Outline Titles( Top Left ) );


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

space.PNG

Jim