cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • See how to interactively organize and restructure data for analysis. Register for May 29 webinar, 2pm US ET.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
parkmintae72
Level I

Having multiple graphs in one window

Hi,

I have a question on multiple graphs in one window (not in graph builder).

I'd like to have multiple line graphs having each x- and y-axis (like below figure - actually 3 columns&4 rows) - Actually this type of graphs can be generated using 'Fit Y by X' mode. However, it cannot draw lines like this.

parkmintae72_1-1704907484233.png

 

I remember that "V List Box" or "H List Box" option in scripts could do this. However, I can't recall it fully and even I couldn't find any information about that from googling.

Can I do this in the 'Graph Builder' mode?

1 ACCEPTED SOLUTION

Accepted Solutions
parkmintae72
Level I

Re: Having multiple graphs in one window

I've made my own script (as an example) based on exactly what I wanted using 'V List Box' and 'H List Box'.

 

Below script can be executed when you open the "$SAMPLE_DATA/Big Class.jmp".

New Window( "Run Data", 

	H List Box(
		V List Box(
			Graph Builder(
				Size( 400, 350 ),
				Show Control Panel( 0 ),
				Variables( X( :weight ), Y( :height ), Overlay( :sex ), Color( :name ) ),
				Elements( Line( X, Y, Legend( 5 ) ), Points( X, Y, Legend( 6 ) ) ),
				SendToReport(
					Dispatch(
						{},
						"Graph Builder",
						OutlineBox,
						{Set Title( "weight" ), Image Export Display( Normal )}
					),
					Dispatch( {}, "height", ScaleBox, {Label Row( Show Major Grid( 1 ) )} ),
					Dispatch( {}, "weight", ScaleBox, {Label Row( Show Major Grid( 1 ) )} ),
					Dispatch( {}, "graph title", TextEditBox, {Set Text( "" )} )
				)
			)
		), 

		V List Box(
			Graph Builder(
				Size( 400, 350 ),
				Show Control Panel( 0 ),
				Variables( X( :height ), Y( :weight ), Overlay( :sex ), Color( :name ) ),
				Elements( Line( X, Y, Legend( 5 ) ), Points( X, Y, Legend( 6 ) ) ),
				SendToReport(
					Dispatch(
						{},
						"Graph Builder",
						OutlineBox,
						{Set Title( "height" ), Image Export Display( Normal )}
					),
					Dispatch( {}, "weight", ScaleBox, {Label Row( Show Major Grid( 1 ) )} ),
					Dispatch( {}, "height", ScaleBox, {Label Row( Show Major Grid( 1 ) )} ),
					Dispatch( {}, "graph title", TextEditBox, {Set Text( "" )} )
				)
			)
		),

	), 

	H List Box(
		V List Box(
			Graph Builder(
				Size( 400, 350 ),
				Show Control Panel( 0 ),
				Variables( X( :age ), Y( :height ), Overlay( :sex ), Color( :name ) ),
				Elements( Line( X, Y, Legend( 5 ) ), Points( X, Y, Legend( 6 ) ) ),
				SendToReport(
					Dispatch(
						{},
						"Graph Builder",
						OutlineBox,
						{Set Title( "age" ), Image Export Display( Normal )}
					),
					Dispatch( {}, "height", ScaleBox, {Label Row( Show Major Grid( 1 ) )} ),
					Dispatch( {}, "age", ScaleBox, {Label Row( Show Major Grid( 1 ) )} ),
					Dispatch( {}, "graph title", TextEditBox, {Set Text( "" )} )
				)
			)
		), 

		V List Box(
			Graph Builder(
				Size( 400, 350 ),
				Show Control Panel( 0 ),
				Variables( X( :height ), Y( :age ), Overlay( :sex ), Color( :name ) ),
				Elements( Line( X, Y, Legend( 5 ) ), Points( X, Y, Legend( 6 ) ) ),
				SendToReport(
					Dispatch(
						{},
						"Graph Builder",
						OutlineBox,
						{Set Title( "height" ), Image Export Display( Normal )}
					),
					Dispatch( {}, "age", ScaleBox, {Label Row( Show Major Grid( 1 ) )} ),
					Dispatch( {}, "height", ScaleBox, {Label Row( Show Major Grid( 1 ) )} ),
					Dispatch( {}, "graph title", TextEditBox, {Set Text( "" )} )
				)
			)
		),

	)
);

 

 

 

 

View solution in original post

2 REPLIES 2
jthi
Super User

Re: Having multiple graphs in one window

Using Lineup Box with N Col(2) is most likely easier for something like this

Names Default To Here(1); 

dt = open("$SAMPLE_DATA/Big Class.jmp");


new window("",
	Lineup Box(N Col(2),
		dt << Graph Builder(
			Variables(X(:weight), Y(:height), Overlay(:sex)),
			Elements(Points(X, Y, Legend(9)), Line Of Fit(X, Y, Legend(11)))
		),
		dt << Graph Builder(
			Variables(X(:weight), Y(:height), Overlay(:sex)),
			Elements(Points(X, Y, Legend(9)), Line Of Fit(X, Y, Legend(11)))
		),
		dt << Graph Builder(
			Variables(X(:weight), Y(:height), Overlay(:sex)),
			Elements(Points(X, Y, Legend(9)), Line Of Fit(X, Y, Legend(11)))
		),
		dt << Graph Builder(
			Variables(X(:weight), Y(:height), Overlay(:sex)),
			Elements(Points(X, Y, Legend(9)), Line Of Fit(X, Y, Legend(11)))
		)
	);
);

You could also check out Combine Windows from Window menu.

-Jarmo
parkmintae72
Level I

Re: Having multiple graphs in one window

I've made my own script (as an example) based on exactly what I wanted using 'V List Box' and 'H List Box'.

 

Below script can be executed when you open the "$SAMPLE_DATA/Big Class.jmp".

New Window( "Run Data", 

	H List Box(
		V List Box(
			Graph Builder(
				Size( 400, 350 ),
				Show Control Panel( 0 ),
				Variables( X( :weight ), Y( :height ), Overlay( :sex ), Color( :name ) ),
				Elements( Line( X, Y, Legend( 5 ) ), Points( X, Y, Legend( 6 ) ) ),
				SendToReport(
					Dispatch(
						{},
						"Graph Builder",
						OutlineBox,
						{Set Title( "weight" ), Image Export Display( Normal )}
					),
					Dispatch( {}, "height", ScaleBox, {Label Row( Show Major Grid( 1 ) )} ),
					Dispatch( {}, "weight", ScaleBox, {Label Row( Show Major Grid( 1 ) )} ),
					Dispatch( {}, "graph title", TextEditBox, {Set Text( "" )} )
				)
			)
		), 

		V List Box(
			Graph Builder(
				Size( 400, 350 ),
				Show Control Panel( 0 ),
				Variables( X( :height ), Y( :weight ), Overlay( :sex ), Color( :name ) ),
				Elements( Line( X, Y, Legend( 5 ) ), Points( X, Y, Legend( 6 ) ) ),
				SendToReport(
					Dispatch(
						{},
						"Graph Builder",
						OutlineBox,
						{Set Title( "height" ), Image Export Display( Normal )}
					),
					Dispatch( {}, "weight", ScaleBox, {Label Row( Show Major Grid( 1 ) )} ),
					Dispatch( {}, "height", ScaleBox, {Label Row( Show Major Grid( 1 ) )} ),
					Dispatch( {}, "graph title", TextEditBox, {Set Text( "" )} )
				)
			)
		),

	), 

	H List Box(
		V List Box(
			Graph Builder(
				Size( 400, 350 ),
				Show Control Panel( 0 ),
				Variables( X( :age ), Y( :height ), Overlay( :sex ), Color( :name ) ),
				Elements( Line( X, Y, Legend( 5 ) ), Points( X, Y, Legend( 6 ) ) ),
				SendToReport(
					Dispatch(
						{},
						"Graph Builder",
						OutlineBox,
						{Set Title( "age" ), Image Export Display( Normal )}
					),
					Dispatch( {}, "height", ScaleBox, {Label Row( Show Major Grid( 1 ) )} ),
					Dispatch( {}, "age", ScaleBox, {Label Row( Show Major Grid( 1 ) )} ),
					Dispatch( {}, "graph title", TextEditBox, {Set Text( "" )} )
				)
			)
		), 

		V List Box(
			Graph Builder(
				Size( 400, 350 ),
				Show Control Panel( 0 ),
				Variables( X( :height ), Y( :age ), Overlay( :sex ), Color( :name ) ),
				Elements( Line( X, Y, Legend( 5 ) ), Points( X, Y, Legend( 6 ) ) ),
				SendToReport(
					Dispatch(
						{},
						"Graph Builder",
						OutlineBox,
						{Set Title( "height" ), Image Export Display( Normal )}
					),
					Dispatch( {}, "age", ScaleBox, {Label Row( Show Major Grid( 1 ) )} ),
					Dispatch( {}, "height", ScaleBox, {Label Row( Show Major Grid( 1 ) )} ),
					Dispatch( {}, "graph title", TextEditBox, {Set Text( "" )} )
				)
			)
		),

	)
);

 

 

 

 

Recommended Articles