You pose an interesting question regarding axis identification in Graph Builder. I have taken a look at the axis structure that Graph Builder uses, and it appears to have an organization to it, that one can use.
The above Graph Builder chart has one Y axis and several X axes. The structure for the graphs I tried out always used Axis 1 as the first X axis and Axis 2 and the first Y axis. So in using the below code, even when the graph type was changed, the axis number remained the same.
Names Default to Here(1);
dt=open("$SAMPLE_DATA/semiconductor capability.jmp");
gb=Graph Builder(
Size( 593, 526 ),
Show Control Panel( 0 ),
Variables( X( :PNP1 ), Y( :NPN1 ), Group X( :SITE ) ),
Elements( Points( X, Y, Legend( 5 ) ), Smoother( X, Y, Legend( 6 ) ) )
);
report(gb)[Axis Box(1)] << min(150);
Axis Box(2) reference would change the Y axis.
There are also Axis boxes 3,4,5 & 6, which are the other 5 X axes being displayed.
This example has added in a second variable to the Y axis, however, the Axis Box(1) is still the first X axis, Axis Box(2) is the Y axis for the top column, "PNP4", while Axis Box(3) is the Y axis for the "NPN1" column.
Names Default to Here(1);
dt=open("$SAMPLE_DATA/semiconductor capability.jmp");
GB=Graph Builder(
Size( 593, 526 ),
Show Control Panel( 0 ),
Variables( X( :PNP1 ), Y( :PNP4 ), Y( :NPN1 ), Group X( :SITE ) ));
If you rt mouse click on the Grey Expansion Triangle and select
Edit==>Show Tree Structure
you should be able to determine the axis box structure for the graphs that you are using, and will be able to programmatically determine how to reference the correct Axis Box
Jim