Subscribe Bookmark RSS Feed

Change X-Axis Label Orientation

rlcvc

New Contributor

Joined:

Jan 19, 2017

Hi,

In the variability chart, I am trying to change the text orientation of one of the X variables. Here is the part of the code.

X_List = {"SPLIT", "LOTID", "Tool", "Boat", "Wfrid"};

varChartObj = Variability Chart(
	Y( collist[i] ),
	X( Eval(X_List) ),
	Analysis Type( "Choose best analysis (EMS REML Bayesian)" ),
	Std Dev Chart( 0 ),
	Show Box Plots( 1 ),
);
report(varChartObj)[Frame Box(1)]<< Row Legend( Eval(X_Legend),  Color( 1 ), Marker( 0 ) );
report(varChartObj)[axisbox(1)]<< Add Ref Line( LSL, "Solid", "Red", "LSL", 1 );
report(varChartObj)[axisbox(1)]<< Add Ref Line( USL, "Solid", "Red", "USL", 1 );
report(varChartObj)[axisbox(1)]<< Add Ref Line( Target, "Dashed", "Red", "Target", 1 );
report(varChartObj)[axisbox(1)]<< min(LSL-0.1*(USL-LSL));
report(varChartObj)[axisbox(1)]<< max(USL+0.1*(USL-LSL));
report(varChartObj)[axisbox(1)]<< Inc(0.1*abs(USL-LSL));

Appreciate if someone can show me how I can achieve it. Say if I want to change X variable "Tool" to vertical orientation.

 

Thank you.

 

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson

Super User

Joined:

Jun 22, 2012

Solution

I believe you need to change ScaleBox to AxisBox

Jim
4 REPLIES
ian_jmp

Staff

Joined:

Jun 23, 2011

It's almost always good to 'do it by hand', then inspect the code that JMP generates for you:

NamesDefaultToHere(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
dt << Variability Chart(
				Y( :height ),
				X( :age, :sex ),
				Std Dev Chart( 0 ),
				SendToReport(
					Dispatch(
						{"Variability Chart for height"},
						"",
						NomAxisBox,
						{Rotated Tick Labels( 1 )}
					)
				)
			);
rlcvc

New Contributor

Joined:

Jan 19, 2017

Yes, I did. After looking at the script generated, I tried:

report(varChartObj)[ScaleBox(2)]<< Label Row( 3, Label Orientation( "Vertical" ));

 

But it did not work.

Btw, I am using loop to generate many plots at one time.

txnelson

Super User

Joined:

Jun 22, 2012

Solution

I believe you need to change ScaleBox to AxisBox

Jim
rlcvc

New Contributor

Joined:

Jan 19, 2017

Awesome. Thanks a lot.