Subscribe Bookmark RSS Feed

Change Y-axis title

illinitom

Community Trekker

Joined:

Aug 5, 2016

I would like to change the y-axis title of an overlay plot, but not sure how to achieve that.  I can "Add Axis Label" to chart, but that appends only.  Ideally, I would like the default label removed and replaced with more descriptive text.

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson

Super User

Joined:

Jun 22, 2012

Solution

In Graph Builder, the Y axis label is a Text Edit Box.  The following script shows how to change it.

Graph Builder(
	Variables( X( :ww ), Y( :ww ), Y( :Yield, Position( 1 ), Side( "Right" ) ) ),
	Elements(
		Bar( X, Y( 1 ), Legend( 1 ), Summary Statistic( "N" ) ),
		Line( X, Y( 2 ), Legend( 2 ) )
	),
	SendToReport(
		Dispatch( {}, "Y title", TextEditBox, {Set Text( "This is the change" )} )
	)
);
Jim
7 REPLIES
markbailey

Staff

Joined:

Jun 23, 2011

Remove the original title, then add the desired title

db << Remove Axis Label << Add Axis Lable( "label" );
Learn it once, use it forever!
illinitom

Community Trekker

Joined:

Aug 5, 2016

Original label still exists running the following command;

 

report(obj)[axisbox(2)] << Remove Axis Label << Add Axis Label("Shipped Wafer Volume");

 

 

markbailey

Staff

Joined:

Jun 23, 2011

You might have to include the original label as an argument in the first message:

db << Remove Axis Label( "original" );
Learn it once, use it forever!
Jeff_Perkinson

Community Manager

Joined:

Jun 23, 2011

The answers so far have focused on scripting but if you aren't writing a script and want to change it interactively, you can click on the label and edit it.

 

JMPScreenSnapz064.png

 

If you do want to script it, after making the change this getting the script for the platform will show you how to change it.

 

Finally, if you're using the Overlay Plot platform you should be aware that it's being (slowly) depreacated in favor of Graph Builder. You should be able to use Graph Builder for most everythign you can do in Overlay Plot.

 

-Jeff
illinitom

Community Trekker

Joined:

Aug 5, 2016

Sorry, I wasn't clear.  I am using Graph Builder.  Below is the example code.  I was hoping these edits could be handled within the GraphBuilder() function itself, but can't seem to find correct syntax in Help manuals.

 

 obj = Graph Builder( 
	Variables( X( :WW), Y(:WW), Y( :YIELD, Position(1), Side("Right" )) ), 
	Elements(
		Bar(X, Y( 1), , Bar Style("Side by side"), Summary Statistic("N") ),
		Line (X, Y( 2), Summary Statistic("Mean")	),
		Title(prog),
		//show legend(1),
		),

);
txnelson

Super User

Joined:

Jun 22, 2012

Solution

In Graph Builder, the Y axis label is a Text Edit Box.  The following script shows how to change it.

Graph Builder(
	Variables( X( :ww ), Y( :ww ), Y( :Yield, Position( 1 ), Side( "Right" ) ) ),
	Elements(
		Bar( X, Y( 1 ), Legend( 1 ), Summary Statistic( "N" ) ),
		Line( X, Y( 2 ), Legend( 2 ) )
	),
	SendToReport(
		Dispatch( {}, "Y title", TextEditBox, {Set Text( "This is the change" )} )
	)
);
Jim
Steven_Moore

Super User

Joined:

Jun 4, 2014

Thanks Jeff;  You can do the same thing in Graph Builder.  I do that or, if I want to save the script, I just edit the script to the Y-axis name I want......and I am nobody's script writer! ;)

Steve