cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Try the Materials Informatics Toolkit, which is designed to easily handle SMILES data. This and other helpful add-ins are available in the JMP® Marketplace
Choose Language Hide Translation Bar

How to determine min and max of axis using JSL?

Hi

Does anyone know how to determine the min and max values for an axisbox? There are Min ans Max messages but these only allow you to set the values - I need to read them.

Thanks
4 REPLIES 4

Re: How to determine min and max of axis using JSL?

I don't know if there's an easier way of doing it than this, but the following seems to do the trick by assigning all the properties of axis box[1] and axis box[2] to the appropriate columns of Big Class, from where they can presumably be extracted:



 

open("$SAMPLE_DATA/Big Class.jmp");



gg = Overlay Plot( X( :height ), Y( :weight ), Separate Axes( 1 ) );

ggr = gg << report;



show properties(ggr[axis box(1)]); // to see what the options are;



ggr[axis box(1)] << save to column property;

ggr[axis box(2)] << save to column property;

 


Does that solve the problem?
mpb
mpb
Level VII

Re: How to determine min and max of axis using JSL?

Building on this try the following:


style="color: rgb(0, 0, 221);">Open
(
"$SAMPLE_DATA/Big
Class.jmp"
)
style="color: navy;">;


gg
=
Overlay Plot(
X(
:height
)
style="color: navy;">,

Y(
:weight
)
style="color: navy;">,

Separate Axes(

style="color: teal;">1

)
)
style="color: navy;">;


ggr =
gg <<
report
style="color: navy;">;


 


style="color: rgb(0, 0, 221);">Show Properties
(
ggr[axis
box(

style="color: teal;">1

)]
)
style="color: navy;">;

//
to see what the
options are;


axinfo1
=
ggr[axis
box(

style="color: teal;">1

)]
<<
copy axis settings
style="color: navy;"><<

get script;

axinfo2 =
ggr[axis
box(

style="color: teal;">2

)]
<<
copy axis settings
style="color: navy;"><<

get script;


 


style="color: rgb(0, 0, 221);">Show
(
axinfo1,
axinfo2 )
style="color: navy;">;


 

Max1
=
axinfo1[
style="color: purple;">"Max"
]
style="color: navy;">;


Min1 =
axinfo1[
style="color: purple;">"Min"
]
style="color: navy;">;


Max2 =
axinfo2[
style="color: purple;">"Max"
]
style="color: navy;">;


Min2 =
axinfo2[
style="color: purple;">"Min"
]
style="color: navy;">;



style="color: rgb(0, 0, 221);">Show
(
Max1,
Min1,
Max2,
Min2 )
style="color: navy;">;

Re: How to determine min and max of axis using JSL?

Two great tips.

These should solve the immediate problem and I suspect a number of others where we have to go through slight convolutions to get JSL to do the things we "think" it should be able to do.

Many thanks
wiebepo
Level III

Re: How to determine min and max of axis using JSL?

This worked for me in JMP 10.0.0

Building off of DavidQR's example:

open("$SAMPLE_DATA/Big Class.jmp");

gg = Overlay Plot( X( :height ), Y( :weight ), Separate Axes( 1 ) );

axis_setting_Min=(report(gg)[axisbox(1)]<<getscript())["Min"];

axis_setting_Max=(report(gg)[axisbox(1)]<<getscript())["Max"];