Subscribe Bookmark RSS Feed

Common y-axis scale with fixed interval for all plots

vuthuy-dung0

New Contributor

Joined:

Jul 7, 2016

Hi, I'm very new in JMP scripting.

I habe many data from my table, my script creates many x-y-diagrams as a jpg-output.

For data comparison I want to adjust same y-axis scale (e.g. 0 - 40 beads or 0-0.1%) for all plots.

Who can help me?

2 REPLIES
jvillaumie

Community Trekker

Joined:

Jun 9, 2014

You can specify the min, max, increment and other values with Format (works for x and y axis). The values can be fixed numbers, or variables that an earlier part of the script calculates, as in the following script I made. global_result_minimum, global_result_maximum and global_timepoint_maximum are all variables that are calculated earlier by the script.

In your case, you can make your figure yourself, change the axes, then save the script to the scripting window to see exactly where you need to define your axes.

 

Data Table( "Current Plot Table" ) << Overlay Plot(

 

                  X( :Name( "Test points (Months)" ) ),

 

                  Y( column(7), column(8), column(9), column(10),column(11)),

 

                  Grouping( :Batch Number, :Pack size ),

 

                  Connect Thru Missing( 1 ),

 

                  :name("25°C/60%RH") (

 

                  Connect Color( 5 ),

 

                  Overlay Marker Color( 5 )

 

                  ),

 

                  :name("30°C/75%RH") (

 

                  Connect Color( 4 ),

 

                  Overlay Marker Color( 4 )

 

                  ),

 

                  :name("40°C/75%RH") (

 

                  Connect Color( 3 ),

 

                  Overlay Marker Color( 3 )

 

                  ),                     

 

                  By( :Market, :Strength),

 

                        SendToReport(

 

                  Dispatch(

 

                        {},

 

                        "102",

 

                        ScaleBox,

 

                        {Format( "Best", 12 ), min(global_result_minimum), max(global_result_maximum), Add Ref Line( Market_limit, Dotted, "Gray", Market_limit_name, 2 ), Inc( 5 ), Minor Ticks( 1 )}

 

                  ),

 

                  Dispatch(

 

                        {},

 

                        "101",

 

                        ScaleBox,

 

                        {Min( 0 ), Max(global_timepoint_maximum), Inc( 3), Minor Ticks( 2 )}

 

                  )

 

            ))

 

vuthuy-dung0

New Contributor

Joined:

Jul 7, 2016

Thank you very much for fast answer

Sorry, maybe silly question.

How do I make this example work?

The log-protocol anwers me this after I run script:

Cannot locate data table in access or evaluation of 'Data Table' , Data Table/*###*/("Current Plot Table")