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

Issues with JMP17 Variability chart Row Legends

I am trying to add row legends in the VC plots. However, the sendToReport doesn't add legends to all the plots. It only work for the first plot but not for the other VC charts. It used to work just fine in JMP 16. 

Jackie__0-1691156612720.png

 

Any work around?

 

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Variability Data/2 Factors Crossed.jmp" );
obj = dt << Variability Chart( Y( :Measurement,:Standard ), X( :Operator, :part# ),

SendToReport(
		Dispatch(
			{"",
			""},
			"Variability Chart",
			FrameBox,
			{Row Legend(
				Operator,
				Color( 1 ),
				Color Theme( "JMP Default"(1) ),
				Marker( 0 ),
				Marker Theme( "" ),
				Continuous Scale( 0 ),
				Reverse Scale( 0 ),
				Excluded Rows( 0 )
			)}
		)
	) );
1 ACCEPTED SOLUTION

Accepted Solutions
jthi
Super User

Re: Issues with JMP17 Variability chart Row Legends

One option is to use XPath to get references to FrameBoxes.

Names Default To Here(1);

dt = Open("$SAMPLE_DATA/Variability Data/2 Factors Crossed.jmp");

obj = dt << Variability Chart(
	Y(:Measurement, :Standard),
	X(:Operator, :part#)
);

(Report(obj) << XPath("//FrameBox")) << Row Legend(
	Operator,
	Color(1),
	Color Theme("JMP Default"(1)),
	Marker(0),
	Marker Theme(""),
	Continuous Scale(0),
	Reverse Scale(0),
	Excluded Rows(0)
);

This example uses ALL frameboxes, but most likely you want to limit the selection in XPath query or use specific indices.

Also this is a little related to this discussion Show Legend on each graph on builder when using Page 

 

Edit: Example of how to use xml attribute and its value in XPath and indexing:

View more...
Names Default To Here(1);

dt = Open("$SAMPLE_DATA/Variability Data/2 Factors Crossed.jmp");

obj = dt << Variability Chart(
	Y(:Measurement, :Standard),
	X(:Operator, :part#)
);

fbs = Report(obj) << XPath("//FrameBox[@helpKey = 'Variability Chart']");
fbs[1::N Items(fbs)::2] << Row Legend(
	Operator,
	Color(1),
	Color Theme("JMP Default"(1)),
	Marker(0),
	Marker Theme(""),
	Continuous Scale(0),
	Reverse Scale(0),
	Excluded Rows(0)
);

 

-Jarmo

View solution in original post

5 REPLIES 5
statman
Super User

Re: Issues with JMP17 Variability chart Row Legends

I have never been able to add legends directly to the plot.  The legends always show up in a separate window which is frustrating.  Anxious to hear if anyone can solve this or it just needs to be added to the wish list.

"All models are wrong, some are useful" G.E.P. Box

Re: Issues with JMP17 Variability chart Row Legends

You need to send the legend code to the outline nodes that you are interested in.

dt = Open( "$SAMPLE_DATA/Variability Data/2 Factors Crossed.jmp" );
obj = Variability Chart(
	Y( :Measurement, :Standard ),
	X( :Operator, :part# ),
	SendToReport(
		Dispatch(
			{"Variability Gauge Analysis for Measurement",
			"Variability Chart for Measurement"},
			"Variability Chart",
			FrameBox,
			{Row Legend(
				:Operator,
				Color( 1 ),
				Color Theme( "JMP Default"(1) ),
				Marker( 0 ),
				Marker Theme( "" ),
				Continuous Scale( 0 ),
				Reverse Scale( 0 ),
				Excluded Rows( 0 )
			)}
		),
		Dispatch(
			{"Variability Gauge Analysis for Standard",
			"Variability Chart for Standard"},
			"Variability Chart",
			FrameBox,
			{Row Legend(
				Operator,
				Color( 1 ),
				Color Theme( "JMP Default"(1) ),
				Marker( 0 ),
				Marker Theme( "" ),
				Continuous Scale( 0 ),
				Reverse Scale( 0 ),
				Excluded Rows( 0 )
			)}
		)
	)
);
Jackie_
Level VI

Re: Issues with JMP17 Variability chart Row Legends

@tonya_mauldin  I have 200+ columns and brute forcing for each column wouldn't be the best approach.

 

Col_names = dt << get column names(); /// contains 200+ columns
obj = dt << Variability Chart( Y( Eval(Col_names) ), X(:LotNumber, :WaferId),

SendToReport(
		Dispatch(
			{"", 
			""},/// is there a way to reference the column name for 200+ colunm names here?
			"Variability Chart",
			FrameBox,
			{Row Legend(
				Operator,
				Color( 1 ),
				Color Theme( "JMP Default"(1) ),
				Marker( 0 ),
				Marker Theme( "" ),
				Continuous Scale( 0 ),
				Reverse Scale( 0 ),
				Excluded Rows( 0 )
			)}
		)
	) );

 

jthi
Super User

Re: Issues with JMP17 Variability chart Row Legends

One option is to use XPath to get references to FrameBoxes.

Names Default To Here(1);

dt = Open("$SAMPLE_DATA/Variability Data/2 Factors Crossed.jmp");

obj = dt << Variability Chart(
	Y(:Measurement, :Standard),
	X(:Operator, :part#)
);

(Report(obj) << XPath("//FrameBox")) << Row Legend(
	Operator,
	Color(1),
	Color Theme("JMP Default"(1)),
	Marker(0),
	Marker Theme(""),
	Continuous Scale(0),
	Reverse Scale(0),
	Excluded Rows(0)
);

This example uses ALL frameboxes, but most likely you want to limit the selection in XPath query or use specific indices.

Also this is a little related to this discussion Show Legend on each graph on builder when using Page 

 

Edit: Example of how to use xml attribute and its value in XPath and indexing:

View more...
Names Default To Here(1);

dt = Open("$SAMPLE_DATA/Variability Data/2 Factors Crossed.jmp");

obj = dt << Variability Chart(
	Y(:Measurement, :Standard),
	X(:Operator, :part#)
);

fbs = Report(obj) << XPath("//FrameBox[@helpKey = 'Variability Chart']");
fbs[1::N Items(fbs)::2] << Row Legend(
	Operator,
	Color(1),
	Color Theme("JMP Default"(1)),
	Marker(0),
	Marker Theme(""),
	Continuous Scale(0),
	Reverse Scale(0),
	Excluded Rows(0)
);

 

-Jarmo
Jackie_
Level VI

Re: Issues with JMP17 Variability chart Row Legends

It works. Thank you Jarmo