cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar
MPK
MPK
Level II

How to export multiple windows created by Lineup Box to a single pdf?

Hi,

 

I'm a JMP novice using JMP 16.0.0 on a Mac.  I'm trying to write a script that will open and rearrange .txt files generated by an electroretinography instrument and its software. The files include repeated time series (time and voltage values) in columns, which I stack and plot in JMP 16.0.0 using the Lineup Box feature. Currently I generate two Lineup Box windows (see attachment). In the final step, I'd like to be able to use JSL to export the multigraph windows to a pdf as I can in JMP, but I have been unable to find a way to do this.  Ideally, both windows would be merged in one pdf document.

 

Is there a way to export windows created by Lineup Box in JSL?  Or can someone direct me to a suitable resource for achieving this goal (maybe I need to understand how to use Dashboard to assemble graphs for export)?

 

Thanks for your time!

 

Cheers,

Mark

 

 

Lineup Box output.png

1 ACCEPTED SOLUTION

Accepted Solutions
pauldeen
Level VI

Re: How to export multiple windows created by Lineup Box to a single pdf?

Throw your whole linup box in a journal and use this bit of code:

//Define setup information to save in pdf
jrn = current journal();
jrn << Set page setup( margins( 0.5, 0.5, 0.5, 0.5 ), scale( 0.4 ), portrait( 1 ), paper size( "A4" ) );
jrn << Save PDF( "report.pdf" );

View solution in original post

6 REPLIES 6
pauldeen
Level VI

Re: How to export multiple windows created by Lineup Box to a single pdf?

Throw your whole linup box in a journal and use this bit of code:

//Define setup information to save in pdf
jrn = current journal();
jrn << Set page setup( margins( 0.5, 0.5, 0.5, 0.5 ), scale( 0.4 ), portrait( 1 ), paper size( "A4" ) );
jrn << Save PDF( "report.pdf" );
MPK
MPK
Level II

Re: How to export multiple windows created by Lineup Box to a single pdf?

Hi Paul,

 

Although your suggestion to "Throw your whole lineup box in a journal" was initially frightening to a newbie, I cast about the web for syntax, and at the top of the script added a new journal window with:

 

new window(sample||"_ERG", <<journal);

and then followed each section of code that created a Lineup Box window with:

current report()<<journal;

At the end of the script I adjusted your code to match my window names:

jrn = current journal();
jrn << Set page setup( margins( 0.5, 0.5, 0.5, 0.5 ), scale( 0.4 ), portrait( 1 ), paper size( "A4" ) );
jrn << Save PDF( sample||"_ERG.pdf" );

 

This worked almost perfectly!  I've attached screenshots (pardon the resolution) of the JSL saved .pdf (first attachment) and of the journal window manually exported as a pdf from JMP (second attachment).  If possible I'd like to scrub the "Graph Builder" control headers from the JSL output (as in the JMP output) and enlarge the plots a bit, but other than that you provided the solution I was looking for.  Thanks very much.

 

Cheers,

MarkSaved from JSL.pngExported from JMP.png

Re: How to export multiple windows created by Lineup Box to a single pdf?

Is there a reason that you use separate windows for each line up box? Could you use one window and partition it using a container box such as an outline box or panel box? You can then save all of them as a single PDF.

 

Do you use JMP Pro? If so, then you should look into the Functional Data Explorer. It is made for data like your data.

MPK
MPK
Level II

Re: How to export multiple windows created by Lineup Box to a single pdf?

Hi Mark,

 

Thanks for your response.  I used separate windows because the each window includes graphs with a different y-axis scale.  But I didn't know about container boxes, which I'll look into.  I don't have access to JMP Pro.

 

Cheers,

Mark

Re: How to export multiple windows created by Lineup Box to a single pdf?

Here is a very rough sketch of the flow. Your own script already has more detail about the plots, but this might help you understand the direction that I was suggesting. JMP windows can be very dynamic.

 

Names Default to Here( 1 );

// open data files

// prepare data table for Graph Builder

// create window
nw = New Window( "Functions",
	vlb = V List Box()
);

// append new content
vlb << Append(
	V List Box(
		Outline Box( "B6-3553m_DAplot",
			Line Up Box( N Col( 4 ),
				// series of Graph Builder platfomrs
			)
		)
	)
);

// append more new content
vlb << Append(
	V List Box(
		Outline Box( "B6-3553m_LAplot",
			Line Up Box( N Col( 4 ),
				// series of Graph Builder platfomrs
			)
		)
	)
);

nw << Save PDF( "path/file" );
MPK
MPK
Level II

Re: How to export multiple windows created by Lineup Box to a single pdf?

Hi Mark,

 

Thanks.  Your framework is much more elegant than my kludgy script (which is too embarrassing to share).  I hope to give it a try as it may offer a better approach to accommodate slight changes in the experiment that arise from different instrument settings.

 

Cheers,

Mark