BookmarkSubscribe
Choose Language Hide Translation Bar
Community Trekker

## Graph builder: how to align ticks with left axis by script?

If you have a right axis in a graph builder plot you can align the grid lines for the parameter on the right with the grid lines on the left (see attachment). Is there a way to achieve the same when you create the graph builder plot by script?

1 ACCEPTED SOLUTION

Accepted Solutions
Staff

## Re: Graph builder: how to align ticks with left axis by script?

NamesDefaultToHere(1);

dt = Open("\$SAMPLE_DATA/Big Class.jmp");

gb = dt << Graph Builder(

Show Control Panel( 0 ),

Variables(

X( :age ),

Y( :height ),

Y( :weight, Position( 1 ), Side( "Right" ) )

),

Elements(

Points( X, Y( 1 ), Legend( 5 ) ),

Smoother( X, Y( 1 ), Legend( 6 ) ),

Points( X, Y( 2 ), Legend( 7 ) ),

Smoother( X, Y( 2 ), Legend( 8 ) )

)

);

Wait(3);

Report(gb)[GraphBuilderComponentBox(17)] << AlignTicksWithLeftAxis;

3 REPLIES 3
Staff

## Re: Graph builder: how to align ticks with left axis by script?

NamesDefaultToHere(1);

dt = Open("\$SAMPLE_DATA/Big Class.jmp");

gb = dt << Graph Builder(

Show Control Panel( 0 ),

Variables(

X( :age ),

Y( :height ),

Y( :weight, Position( 1 ), Side( "Right" ) )

),

Elements(

Points( X, Y( 1 ), Legend( 5 ) ),

Smoother( X, Y( 1 ), Legend( 6 ) ),

Points( X, Y( 2 ), Legend( 7 ) ),

Smoother( X, Y( 2 ), Legend( 8 ) )

)

);

Wait(3);

Report(gb)[GraphBuilderComponentBox(17)] << AlignTicksWithLeftAxis;

Community Trekker

## Re: Graph builder: how to align ticks with left axis by script?

Thank you!

Maybe you could add documentation for this command for JMP 13, I think right now it is nowhere documented.

Highlighted
Community Trekker

## Re: Graph builder: how to align ticks with left axis by script?

Align Ticks With Left Axis unfortunately is not usable for me as it can happen that some data points are 'cut off'.

Is there a way to find out whether an axis is located left or right (or on the bottom)? My graph might have just two or ten or more axes and it is not sure if it has a right axis. So I would like to turn off grid lines just for right axes.