cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
JMP is taking Discovery online, April 16 and 18. Register today and join us for interactive sessions featuring popular presentation topics, networking, and discussions with the experts.
Choose Language Hide Translation Bar
illinitom
Level II

Change Y-axis title

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

Re: Change Y-axis title

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

View solution in original post

7 REPLIES 7

Re: Change Y-axis title

Remove the original title, then add the desired title

db << Remove Axis Label << Add Axis Lable( "label" );
illinitom
Level II

Re: Change Y-axis title

Original label still exists running the following command;

 

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

 

 

Re: Change Y-axis title

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

db << Remove Axis Label( "original" );
Jeff_Perkinson
Community Manager Community Manager

Re: Change Y-axis title

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
Level II

Re: Change Y-axis title

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

Re: Change Y-axis title

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
Level VI

Re: Change Y-axis title

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