Graph builder - how to add max for x-axis and y-axis using script y-functionI am using graph builder-scatter plot. and adding different trend lines with different constant. and i want to add max for both x-axis and y-axis. how can i do that?
Re: Graph builder - how to add max for x-axis and y-axis using script y-functionI think all you are asking for is:
x = report(gb)[AxisBox(1)] << get max;
Re: Graph builder - how to add max for x-axis and y-axis using script y-functionI am not sure-I can give it a try - but i wanted to know if my existing script derived from y function can be modified to set max for x-axis. heres the equation i am using Y Function (Min(C - M*X), 530 ), x );
-thanks much. appreciate your help and be safe.Re: Graph builder - how to add max for x-axis and y-axis using script y-functionWhy isn't this what you need, in getting the max values for each axis?
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/big class.jmp" );
gb = dt << Graph Builder(
Variables( X( :weight ), Y( :height ) ),
Elements( Points( X, Y, Legend( 6 ) ) )
);
show(report(gb)[AxisBox(1)] << get max,
report(gb)[AxisBox(2)] << get max
);
Re: Graph builder - how to add max for x-axis and y-axis using script y-functionnot sure why-heres the picture again-sorry about that.


Re: Graph builder - how to add max for x-axis and y-axis using script y-functionNo picture in your responseRe: Graph builder - how to add max for x-axis and y-axis using script y-functionFirst of all thanks for a very quick reply.
I want to basically show the trend line cut off for correlation purpose for x-axis and y-axis max allowable.
i was able to get the y-axis max (see picture how its maxed out at 530) but i cant figure out how to get the same for x-axis (I want to show max at 8).
i am using y function from script template.
Re: Graph builder - how to add max for x-axis and y-axis using script y-functionYou can get the max values for each of the Axes by
gb = Graph Builder( ………………………………. );
maxX = report(gb)[AxisBox(1)] << get max;
max& = report(gb)[AxisBox(2)] << get max;
It would be helpful to be more specific on how you are going to use the max values in a trend line.