cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMP® Marketplace featured Capability Explorer add-in
Choose Language Hide Translation Bar

Change marker size and frame size of multiple variability plot

Hi All, 

 

Is there an easy way to use the "sendtoreport" and "dispatch" functions to change the frame size and marker size of the :height and :weight  variability charts?

 

Below is an example using Big Class.jmp. I couldn't find a way to change the marker size and frame size to work in both variability charts. Not sure if there's an easy way without having to use the for loop. 

 

Thanks, 

rex

 

Open( "$SAMPLE_DATA/Big Class.jmp" );
Variability Chart(
		Y( :Height ,:Weight),
		X(:sex),
		Analysis Type( "Choose best analysis (EMS REML Bayesian)" ),
		Std Dev Chart( 0 ),
		Points Jittered( 1 ),
		Show Box Plots( 0 ),
		Show range bars(0),
		Connect cell means(0),
		Show cell means(0),
		SendToReport(
				Dispatch(
					{},
					"variability chart",
					FrameBox,
					{Frame Size( 800, 240 ), Marker Size( 2 )}
				)
		)
	);
3 REPLIES 3
jthi
Super User

Re: Change marker size and frame size of multiple variability plot

You can use XPath to get list of references to frameboxes and then send messages to that list

 

Names Default To Here(1);

dt = Open("$SAMPLE_DATA/Big Class.jmp");
var = dt << Variability Chart(
	Y(:Height, :Weight),
	X(:sex),
	Analysis Type("Choose best analysis (EMS REML Bayesian)"),
	Std Dev Chart(0),
	Points Jittered(1),
	Show Box Plots(0),
	Show range bars(0),
	Connect cell means(0),
	Show cell means(0)
);

fbs = Report(var) << XPath("//FrameBox[@helpKey = 'Variability Chart']");

fbs[1::N Items(fbs)::2] << Frame Size(300, 300) << Marker Size(10);

I use 1,3 indexes (1::N Items(fbs)::2) because the stddev charts are in the report, they are just hidden (2 and 4 indices in this case) butt most likely it would be fine to update those sizes as well.

 

-Jarmo

Re: Change marker size and frame size of multiple variability plot

-Jarmo, 

 

Another problem I have in this example script is "Show Box Plots(0)" does not turn off the box plot. Can you please advise how to turn off the box plot in this example?

 

Thanks, 

rex

jthi
Super User

Re: Change marker size and frame size of multiple variability plot

For me they are disabled in my example. If that doesn't work you can send the message separately to each of the outline variability analyses (or the platform)

Names Default To Here(1);

dt = Open("$SAMPLE_DATA/Big Class.jmp");
var = dt << Variability Chart(
	Y(:Height, :Weight),
	X(:sex),
	Analysis Type("Choose best analysis (EMS REML Bayesian)"),
	Std Dev Chart(0),
	Points Jittered(1),
	Show Box Plots(0),
	Show range bars(0),
	Connect cell means(0),
	Show cell means(0)
);

fbs = Report(var) << XPath("//FrameBox[@helpKey = 'Variability Chart']");

fbs[1::N Items(fbs)::2] << Frame Size(300, 300) << Marker Size(10);

obs_varanalysis = Report(var) << XPath("//OutlineBox[@helpKey = 'Variability' and contains(text(), 'Variability Gauge Analysis for')]");
(obs_varanalysis << Get Scriptable Object) << show box plots(1); // change to 0

Scripting index also has an example, but this might require looping

jthi_0-1726984153170.png

or if you have JMP18 << Broadcast should work

Names Default To Here(1);

dt = Open("$SAMPLE_DATA/Big Class.jmp");
var = dt << Variability Chart(
	Y(:Height, :Weight),
	X(:sex),
	Analysis Type("Choose best analysis (EMS REML Bayesian)"),
	Std Dev Chart(0),
	Points Jittered(1),
	Show Box Plots(0),
	Show range bars(0),
	Connect cell means(0),
	Show cell means(0)
);

fbs = Report(var) << XPath("//FrameBox[@helpKey = 'Variability Chart']");
fbs[1::N Items(fbs)::2] << Frame Size(300, 300) << Marker Size(10);

var << (Variability Analysis[1] << Broadcast(Show Box Plots(1)));
-Jarmo