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

Show same data but with different Overlay variables side-by-side in Graph Builder?

I'm often looking at trend charts in Graph Builder and want to see how multiple different factors are affecting the trends. So I make my trend plot and put a Variable A into the Overlay role, but I really want to also add Variable B to Overlay as well and view the plots side-by-side.

 

MarkJSchwab_0-1627060329724.png

 

Currently, the best way I know to do this is to do Redo Analysis to make a second window, and then put Variable B into the Overlay role in the second window. But this is unwieldy to manage multiple windows - I would like to have both plots in the same window.

 

Is there any way to achieve this currently? I am using JMP Pro 14.3.0.

2 REPLIES 2
jthi
Super User

Re: Show same data but with different Overlay variables side-by-side in Graph Builder?

If you are willing to do some scripting you could use new window and hlist box (or Lineup box(), see scripting index how to use):

Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");

nw = new window("",
	H list box(
		dt << Graph Builder(
			Size(534, 464),
			Show Control Panel(0),
			Variables(X(:name), Y(:weight), Overlay(:age)),
			Elements(Points(X, Y, Legend(10)), Smoother(X, Y, Legend(12))),
			SendToReport(
				Dispatch(
					{},
					"400",
					ScaleBox,
					{Legend Model(
						10,
						Base(0, 0, 0, Item ID("12", 1)),
						Base(1, 0, 0, Item ID("13", 1)),
						Base(2, 0, 0, Item ID("14", 1)),
						Base(3, 0, 0, Item ID("15", 1)),
						Base(4, 0, 0, Item ID("16", 1)),
						Base(5, 0, 0, Item ID("17", 1))
					)}
				)
			)
		),
		dt << Graph Builder(
			Size(534, 464),
			Show Control Panel(0),
			Variables(X(:name), Y(:weight), Overlay(:sex)),
			Elements(Points(X, Y, Legend(10)), Smoother(X, Y, Legend(12))),
			SendToReport(
				Dispatch(
					{},
					"400",
					ScaleBox,
					{Legend Model(
						10,
						Base(-1, 0, 0, Item ID("12", 1)),
						Base(-1, 0, 0, Item ID("13", 1)),
						Base(-1, 0, 0, Item ID("14", 1)),
						Base(-1, 0, 0, Item ID("15", 1)),
						Base(-1, 0, 0, Item ID("16", 1)),
						Base(-1, 0, 0, Item ID("17", 1))
					)}
				)
			)
		)
	)
);

Or create dashboard. First create both graph builder windows and then I think you can do it either with File/New/Dashboard or from Window/Combine Windows:

jthi_0-1627061966125.png

jthi_1-1627061974354.png

(tested with JMP15.2.1)

-Jarmo
ih
Super User (Alumni) ih
Super User (Alumni)

Re: Show same data but with different Overlay variables side-by-side in Graph Builder?

Once you create both charts, you could combine them into a single window using 'Combine Windows' found in the Window menu.

ih_0-1627317033335.png

 

This brings up a dashboard from which you can save the script just like an individual graph.

ih_1-1627317108607.png

 

 

: