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
terapin
Level VI

Creating plots via JSL with automatic axis scaling

I am displaying multiple overlay plots within the JSL H and V List Box structure. I change the start and end date of the data displayed in these plots (see code snippet below) and would like the Y axis data to be automatically scaled to fit within the displayed window without have to manually change the Min and Max values each time I change the date range.  I can't find any information in the JSL scripting guide on how to accomplish this and wonder if it's possible, and if so, how?

 

 

 

sdate = Date MDY( 5, 1, 2011 );

edate = Date MDY( 5, 8, 2011 );

 

New Window( "Dendrometer Reading Plots",

    H List Box (

        V List Box(

            op1 = Overlay Plot(

                X( :Name( "Date & Time" ) ),

                Y( :Name( "Adj, Scld, AN4 Large Point, Bt NW (µm)" ), :Name( "Vapor Pressure Deficit (kPa)" ) ),

                Y Scale( Left, Right ),

                Separate Axes( 1 ),

                Connect Thru Missing( 1 )

            ),

            Report( op1 )[Frame Box( 1 )] << Frame Size( 700, 300 ),

            Report( op1 )[Axis Box( 1 )] << Axis Settings(

                {Format( "Fixed Dec", 10, 0 ), Min( -7650 ), Max( -6800 ), Inc( 50 ), Minor Ticks( 1 ), Show Major Grid( 1 )}

            ) << Remove Axis Label << Add Axis Label( "Adjusted Dendrometer Readings (um)" ),

            Report( op1 )[Axis Box( 2 )] << Axis Settings(

                {Format( "m/d/y", 10 ), Interval( "Day" ), Inc( 1 ), Minor Ticks( 0 ), Show Major Grid( 1 ), Show Minor Grid( 0 ),

                Min( sdate ), Max( edate )}

            ) << Remove Axis Label << Add Axis Label( "Date & Time" ),

            Report( op1 )[Axis Box( 3 )] << Axis Settings(

                {Format( "Fixed Dec", 10, 2 ), Min( 0 ), Max( 2 ), Inc( 0.25 ), Minor Ticks( 1 ), Show Major Grid( 1 )} ),

1 ACCEPTED SOLUTION

Accepted Solutions
wiebepo
Level III

Re: Autoscale Y Axis Settings for Overlay Plots in JSL

To have JMP autoscale an axis min and max, be sure not to include those settings in the script. For example, if other axis format settings are desirable, specify them and exclude the min and max.

Report( op1 )[Axis Box( 3 )] << Axis Settings( 

                {Format( "Fixed Dec", 10, 2 ), Min( 0 ), Max( 2 ), Inc( 0.25 ), Minor Ticks( 1 ), Show Major Grid( 1 )} ),

becomes:

Report( op1 )[Axis Box( 3 )] << Axis Settings( 

                {Format( "Fixed Dec", 10, 2 ), Inc( 0.25 ), Minor Ticks( 1 ), Show Major Grid( 1 )} ),

View solution in original post

2 REPLIES 2
wiebepo
Level III

Re: Autoscale Y Axis Settings for Overlay Plots in JSL

To have JMP autoscale an axis min and max, be sure not to include those settings in the script. For example, if other axis format settings are desirable, specify them and exclude the min and max.

Report( op1 )[Axis Box( 3 )] << Axis Settings( 

                {Format( "Fixed Dec", 10, 2 ), Min( 0 ), Max( 2 ), Inc( 0.25 ), Minor Ticks( 1 ), Show Major Grid( 1 )} ),

becomes:

Report( op1 )[Axis Box( 3 )] << Axis Settings( 

                {Format( "Fixed Dec", 10, 2 ), Inc( 0.25 ), Minor Ticks( 1 ), Show Major Grid( 1 )} ),

GoodMan
Level III

Re: Autoscale Y Axis Settings for Overlay Plots in JSL

Hi Terapin,

Thanks for your raising a interesting question.Here i have ever had similar question. I wonder if you would send me your JMP table so that i can test and try to find a solution.

Best regards

Kun, Leanpharma@gmail.com