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.
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" )} )
)
);
Remove the original title, then add the desired title
db << Remove Axis Label << Add Axis Lable( "label" );
Original label still exists running the following command;
report(obj)[axisbox(2)] << Remove Axis Label << Add Axis Label("Shipped Wafer Volume");
You might have to include the original label as an argument in the first message:
db << Remove Axis Label( "original" );
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.
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.
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),
),
);
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" )} )
)
);
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! ;)