cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Have your say in shaping JMP's future by participating in the new JMP Wish List Prioritization Survey
Choose Language Hide Translation Bar
pankajsync
Level I

Combine multiple plots

Is there a way to combine various graph builder plots (generated through multiple data table files) into one single plot? I.e. A single plot with various subplots in it.

2 ACCEPTED SOLUTIONS

Accepted Solutions
ThuongLe
Level IV

Re: Combine multiple plots

You can use Combine Windows to attach multiple plots together

Capture.PNG

Thuong Le

View solution in original post

Byron_JMP
Staff

Re: Combine multiple plots

Combine Windows is pretty easy, but if you're OK with just a little more complexity, try File>New>Dashboard.

Then pick a template that is close, and drag you figures into the template.

 

@ryandewitt   made a quick video on it doing this, super helpful.

Using the Dashboard Builder in JMP

JMP Systems Engineer, Health and Life Sciences (Pharma)

View solution in original post

8 REPLIES 8
txnelson
Super User

Re: Combine multiple plots

You can easily open a JMP Journal, and then drag and drop graphs into the journal in any order, position that you want.

You can also create a Dashboard and place the output into it.

JSL can also create and move the graphs into a Display Output.

 

If you can supply more information, and maybe a mockup, then providing you with more specifics might be possible.

 

I also suggest that you read the Essential Graphing document in the JMP Documentation Library available under the Help pull down menu.

Jim
ThuongLe
Level IV

Re: Combine multiple plots

You can use Combine Windows to attach multiple plots together

Capture.PNG

Thuong Le
Byron_JMP
Staff

Re: Combine multiple plots

Combine Windows is pretty easy, but if you're OK with just a little more complexity, try File>New>Dashboard.

Then pick a template that is close, and drag you figures into the template.

 

@ryandewitt   made a quick video on it doing this, super helpful.

Using the Dashboard Builder in JMP

JMP Systems Engineer, Health and Life Sciences (Pharma)
MicroSheep
Level II

Re: Combine multiple plots

Hi guys, I was wondering if any of you know how to combine plots from the terminal or a jmp script?

Re: Combine multiple plots

One of the best ways to do it via scripting is to first do it in the GUI, then find the red triangle in the upper left corner of your result window, and select Save Script...To Script Window. Here's an example script to make a dashboard with 2 combined windows. I only had to type 1 line of code (line 1, to open the data table). The rest was generated by JMP when I used Save Script...To Script Window.

open ("$SAMPLE_DATA\Big class.jmp");

JMP App(
	Set Name( "Dashboard" ),
	Set Description( "Description" ),
	Auto Launch( 1 ),
	Snap To Grid( 1 ),
	Show Grid( 1 ),
	Show Properties( 0 ),
	Show Sources( 1 ),
	Group By Category( 0 ),
	Dashboard Mode( 1 ),
	Parameters,
	Tables(
		DataTable1 = GuiTable(
			Set Path( "$SAMPLE_DATA/Big Class.jmp" ),
			Set Label( "Big Class" ),
			Location( "Current Data Table" ),
			Invisible( 0 )
		)
	),
	Script(JSL Quote(// This script is executed when the application is run.
// Named objects have been created for the application modules
// (for example, "Module1") and the pre-defined object
// "thisApplication" refers to the application object itself.
// Variables and functions declared here are scoped to the
// Application namespace.


)	),
	Allocate(
		Module1 = Plan(
			PreAllocate,
			Script(JSL Quote(// This script is executed when a new module instance is
// created.  The pre-defined object "thisModuleInstance" refers
// to the instance object, but other objects such as boxes and
// scripts have not yet been created.  Variables declared here are
// scoped to the ModuleInstance namespace.

// This special function will receive parameters passed to CreateInstance()
OnModuleLoad({},
);

thisModuleInstance << Create Objects;

// After this point your module instance objects have been created
// and can be referred to by name (for example, "Button1").

Try(TabPage3 << Set Scriptable Object(thisApplication));
)			),
			Allocate(
				TabPage3 = Tab Page Box();
				Splitter1 = H Splitter Box();
				TabPage1 = Tab Page Box();
				Scroll1 = Scroll Box();
				Report1 = Platform(
					DataTable1,
					Graph Builder(
						Size( 588, 501 ),
						Show Control Panel( 0 ),
						Fit to Window,
						Variables( X( :age ), Y( :height ) ),
						Elements(
							Points( X, Y, Legend( 12 ) ),
							Smoother( X, Y, Legend( 13 ) )
						)
					)
				);
				TabPage2 = Tab Page Box();
				Scroll2 = Scroll Box();
				Report2 = Platform(
					DataTable1,
					Graph Builder(
						Size( 594, 500 ),
						Show Control Panel( 0 ),
						Fit to Window,
						Variables( X( :sex ), Y( :weight ) ),
						Elements( Points( X, Y, Legend( 3 ) ) )
					)
				);
			),
			Organize(
				Reparent( Scroll2( Report2 ) );
				Reparent( TabPage2( Scroll2 ) );
				Reparent( Splitter1( TabPage2 ) );
				Reparent( Scroll1( Report1 ) );
				Reparent( TabPage1( Scroll1 ) );
				Reparent( Splitter1( TabPage1 ) );
				Reparent( TabPage3( Splitter1 ) );
				Relocate( TabPage3( 0, 0 ) );
			),
			Initialize(
				TabPage3 << Background Color( "None" ),
				TabPage3 << Border( {Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )} ),
				TabPage3 << Enabled( 1 ),
				TabPage3 << Horizontal Alignment( "Default" ),
				TabPage3 << Margin( {Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )} ),
				TabPage3 << Padding(
					{Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )}
				), TabPage3 << Text Color( "None" ), TabPage3 << UI Only( 0 ),
				TabPage3 << Vertical Alignment( "Default" ),
				TabPage3 << Visibility( "Visible" ),
				TabPage3 << Set Min Size( 369, 128 ),
				TabPage3 << Set Max Size( 30000, 30000 ),
				TabPage3 << Set Stretch( {"Neutral", "Neutral"} ),
				TabPage3 << Title( "Dashboard" ), TabPage3 << Tip( "" ),
				TabPage3 << Icon( "" ), TabPage3 << Closeable( 0 ),
				TabPage3 << Moveable( 0 ), TabPage3 << Set Base Font( "Text" ),
				TabPage3 << Set Font Scale( 1 ),
				Splitter1 << Background Color( "None" ),
				Splitter1 << Border(
					{Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )}
				), Splitter1 << Enabled( 1 ),
				Splitter1 << Horizontal Alignment( "Default" ),
				Splitter1 << Margin(
					{Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )}
				),
				Splitter1 << Padding(
					{Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )}
				), Splitter1 << Text Color( "None" ), Splitter1 << UI Only( 0 ),
				Splitter1 << Vertical Alignment( "Default" ),
				Splitter1 << Visibility( "Visible" ), Splitter1 << Dockable( 1 ),
				Splitter1 << Set Width( 1351 ), Splitter1 << Set Height( 537 ),
				Splitter1 << Set Sizes( {0.500741839762611, 0.499258160237389} ),
				Splitter1 << Set Min Size( 369, 102 ),
				Splitter1 << Set Max Size( 60003, 30000 ),
				Splitter1 << Set Stretch( {"Window", "Window"} ),
				Splitter1 << set horizontal( 1 ),
				TabPage1 << Background Color( "None" ),
				TabPage1 << Border( {Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )} ),
				TabPage1 << Enabled( 1 ),
				TabPage1 << Horizontal Alignment( "Default" ),
				TabPage1 << Margin( {Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )} ),
				TabPage1 << Padding(
					{Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )}
				), TabPage1 << Text Color( "None" ), TabPage1 << UI Only( 0 ),
				TabPage1 << Vertical Alignment( "Default" ),
				TabPage1 << Visibility( "Visible" ),
				TabPage1 << Set Min Size( 187, 102 ),
				TabPage1 << Set Max Size( 30000, 30000 ),
				TabPage1 << Set Stretch( {"Neutral", "Neutral"} ),
				TabPage1 << Title( "Graph Builder" ), TabPage1 << Tip( "" ),
				TabPage1 << Icon( "Trellis" ), TabPage1 << Closeable( 1 ),
				TabPage1 << Moveable( 1 ), TabPage1 << Set Base Font( "Text" ),
				TabPage1 << Set Font Scale( 1 ),
				Scroll1 << Background Color( "None" ),
				Scroll1 << Border( {Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )} ),
				Scroll1 << Enabled( 1 ),
				Scroll1 << Horizontal Alignment( "Default" ),
				Scroll1 << Margin( {Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )} ),
				Scroll1 << Padding( {Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )} ),
				Scroll1 << Text Color( "None" ), Scroll1 << UI Only( 0 ),
				Scroll1 << User Resizable( {1, 1} ),
				Scroll1 << Vertical Alignment( "Default" ),
				Scroll1 << Visibility( "Visible" ),
				Scroll1 << Set Min Size( 187, 76 ),
				Scroll1 << Set Max Size( 30087, 30001 ),
				Scroll1 << Set Stretch( {"Window", "Window"} ),
				Scroll1 << Width( 675 ), Scroll1 << Height( 511 ),
				Scroll1 << Set Auto Scrollable( 1 ),
				Scroll1 << Set Scrollers( 0, 0 ), Scroll1 << Set Show Empty( 0 ),
				Scroll1 << Set Clip Printing( 0 ),
				Report1 << Background Color( "None" ),
				Report1 << Border( {Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )} ),
				Report1 << Enabled( 1 ),
				Report1 << Horizontal Alignment( "Default" ),
				Report1 << Margin( {Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )} ),
				Report1 << Padding( {Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )} ),
				Report1 << Text Color( "None" ), Report1 << UI Only( 0 ),
				Report1 << Vertical Alignment( "Default" ),
				Report1 << Visibility( "Visible" ),
				Report1 << Set Min Size( 187, 76 ),
				Report1 << Set Max Size( 30087, 30001 ),
				Report1 << Set Stretch( {"Neutral", "Neutral"} ),
				Report1 << set horizontal( 0 ),
				TabPage2 << Background Color( "None" ),
				TabPage2 << Border( {Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )} ),
				TabPage2 << Enabled( 1 ),
				TabPage2 << Horizontal Alignment( "Default" ),
				TabPage2 << Margin( {Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )} ),
				TabPage2 << Padding(
					{Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )}
				), TabPage2 << Text Color( "None" ), TabPage2 << UI Only( 0 ),
				TabPage2 << Vertical Alignment( "Default" ),
				TabPage2 << Visibility( "Visible" ),
				TabPage2 << Set Min Size( 179, 102 ),
				TabPage2 << Set Max Size( 30000, 30000 ),
				TabPage2 << Set Stretch( {"Neutral", "Neutral"} ),
				TabPage2 << Title( "Graph Builder" ), TabPage2 << Tip( "" ),
				TabPage2 << Icon( "Trellis" ), TabPage2 << Closeable( 1 ),
				TabPage2 << Moveable( 1 ), TabPage2 << Set Base Font( "Text" ),
				TabPage2 << Set Font Scale( 1 ),
				Scroll2 << Background Color( "None" ),
				Scroll2 << Border( {Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )} ),
				Scroll2 << Enabled( 1 ),
				Scroll2 << Horizontal Alignment( "Default" ),
				Scroll2 << Margin( {Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )} ),
				Scroll2 << Padding( {Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )} ),
				Scroll2 << Text Color( "None" ), Scroll2 << UI Only( 0 ),
				Scroll2 << User Resizable( {1, 1} ),
				Scroll2 << Vertical Alignment( "Default" ),
				Scroll2 << Visibility( "Visible" ),
				Scroll2 << Set Min Size( 179, 76 ),
				Scroll2 << Set Max Size( 30079, 30001 ),
				Scroll2 << Set Stretch( {"Window", "Window"} ),
				Scroll2 << Width( 673 ), Scroll2 << Height( 511 ),
				Scroll2 << Set Auto Scrollable( 1 ),
				Scroll2 << Set Scrollers( 0, 0 ), Scroll2 << Set Show Empty( 0 ),
				Scroll2 << Set Clip Printing( 0 ),
				Report2 << Background Color( "None" ),
				Report2 << Border( {Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )} ),
				Report2 << Enabled( 1 ),
				Report2 << Horizontal Alignment( "Default" ),
				Report2 << Margin( {Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )} ),
				Report2 << Padding( {Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )} ),
				Report2 << Text Color( "None" ), Report2 << UI Only( 0 ),
				Report2 << Vertical Alignment( "Default" ),
				Report2 << Visibility( "Visible" ),
				Report2 << Set Min Size( 179, 76 ),
				Report2 << Set Max Size( 30079, 30001 ),
				Report2 << Set Stretch( {"Neutral", "Neutral"} ),
				Report2 << set horizontal( 0 )
			)
		)
	),
	Initialize(
		Module1 << Auto Launch( 1 );
		Module1 << Set Module Type( "Report" );
		Module1 << Set Window Title( "^TABLENAME - ^APPNAME" );
	)
) << Run

Re: Combine multiple plots

With JMP 17, there is also a new option when saving a Combine Windows report.  From the red-triangle menu, Save Script > To Script Window (All Objects) will save a script without the added JMP Application / JMP Dashboard functionality.  This type of script cannot be opened directly in the Dashboard Builder to edit the layout, but it looks more like a script that a JSL developer might write:

Local Here(
	table1 = Open( "$SAMPLE_DATA\Big Class.jmp" );
	New Window( "Big Class - Dashboard",
		Tab Page Box(
			"Dashboard",
			H Splitter Box(
				Size( 991, 666 ),
				<<Sizes( {0.478744939271255, 0.521255060728745} ),
				Tab Page Box(
					"Bivariate Fit of weight By height",
					Scroll Box(
						Size( 473, 640 ),
						Flexible( 1 ),
						V List Box(
							table1 << Bivariate(
								Y( :weight ),
								X( :height ),
								Fit Line( {Line Color( {212, 73, 88} )} )
							)
						)
					)
				),
				Tab Page Box(
					"Distributions",
					Scroll Box(
						Size( 515, 640 ),
						Flexible( 1 ),
						V List Box(
							table1 << Distribution(
								Continuous Distribution( Column( :weight ) ),
								Nominal Distribution( Column( :age ) )
							)
						)
					)
				)
			)
		)
	) << Move Window( 59, 59 ) << Set Window Icon( "ReportFile" );
)
SpannerHead
Level III

Re: Combine multiple plots

I don't recall the way I got to this but I have a measure of success with this.  One downside to this approach is that the graphs compile in an outline box but they are not active graphs with the full red triangle menu available.

 

 

window = Get Window List();
wName = window << Get Window Title;
nWindows = N Items( window );
Scratch = New Window( "Combined graphs", ob = Outline Box( "Compiled Graphs" ) );
For( i = nWindows, i > 0, i--,
	If( Contains( wName[i], "Bivariate" ),
		Jns = window[i]["Bivariate Fit?"] << Get Scriptable Object;
		Show( Jns );
		ob << append( Report( Jns ) );
		Jns << close window;
	)
);
SpannerHead
Level III

Re: Combine multiple plots

Someone at work showed me a much better way to do this.

 

New Window( "Compilation",
	For( j = 1, j <= N Items( target ), j++,.............................

If the iterative function is performed within a new window, the result is a series of active plots that behave as normal.