cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Browse apps to extend the software in the new JMP Marketplace
Choose Language Hide Translation Bar
cis_pete
Level III

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
ian_jmp
Level X

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;

View solution in original post

3 REPLIES 3
ian_jmp
Level X

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;

cis_pete
Level III

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.

cis_pete
Level III

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.