How to Use Variables in Overlay PlotsI often create overlay plots for climate data I analyze and need to be able to quickly change the naming of the column variables used so that I can plot data from different sites. My column naming conventions are such that column names are the same except for a Site Identifier in the name. E.g.,
Tair, FCO (C)
Tair, FCF (C)
Tair, CH3 (C)
Since I have multiple summary tables and/or overlay plots that refer to the same column variables, I would like to be able write the JSL code such that I can change the variable name used in the summary table and overlay plot one time at the top of the program rather than at each separate location.
In the example below I summarize and plot data from sites FCO & FCF. I would like to be able to quickly change to sites FCO and CH3 without changing this code at each location. Any suggestions on how to accomplish this would be greatly appreciated.
sum1 = dt1 << Summary(
Group( :Year, :Month, :Day of Year ),
Min( :Name( "Date & Time" ) ),
N( :Name( "Tair, FCO (C)" ) ),
N( :Name( "Tair, FCF (C)" ) ),
// N( :Name( "Tair, CH3 (C)" ) ),
N( :Name( "Corrected, Tair, FCO (C)" ) ),
);
sdate = Date MDY ( 10, 01, 2002 );
edate = Date MDY ( 11, 31, 2002 );
New Window("Overlay Plot",
V List Box(
op1 = sum1 << Overlay Plot(
X( :Name( "Min(Date & Time)" ) ),
Y( :Name( "N(Tair, FCO (C))" ),
:Name( "N(Tair, FCF (C))" ),
// :Name( "N(Tair, CH3 (C))" ),
:Name( "N(Corrected, Tair, FCO (C))" ),
),
Y Scale( Left, Left, Left ),
Separate Axes( 1 ),
Overlay Plots ( 1 ),
Connect Thru Missing( 1 ),
Marker Size ( 1 ),
),
Report ( op1 )[ Frame Box ( 1 ) ]
<< Frame Size( 750, 350 ),
Report ( op1 ) [ Axis Box ( 1 ) ]
<< Axis Settings( { Format( "Fixed Dec", 10, 0), Min( 0 ), Max( 25 ),
Inc( 2 ), Minor Ticks( 1 ), Show Major Grid( 1 ) } ),
Report ( op1 ) [ Axis Box ( 2 ) ]
<< Axis Settings( { Format( "m/d/y", 10 ), Interval( "Month" ),
Inc( 1 ), Minor Ticks ( 0 ), Show Major Grid( 1 ), Show Minor Grid ( 0 ),
Min( sdate ), Max( edate ) } )
<< Remove Axis Label
<< Add Axis Label ( "Date" ),
)
);2022_Q1 MakeOverChallenge: Action on mouse click in various waysThis is the Makeover Challenge Q1 2022.
The goal is to come up with an example, script or guide to fulfill one of the three tasks (all have to do with initiating some action after you click on something in JMP):
- Challenge A: (images and script to create initial data table for opening images attached: 2022Q1_ChallengeA.zip)
- You have: A data table column with images or links to a website or a file (aka expressions)
- You want: to click on one cell of this column and open the link or the image outside of JMP
- The overall goal: clicking in a data table cell should initiate something
- Challenge B: (script to open the data table and to create the report attached: 2022Q1_ChallengeB_starterScript.jsl)
- You have: Big Class and a Graph Builder report of weight by height (see script)
- You want: Closing the Graph Builder report should open a distribution report of "age", save this report as an picture and close the distribution report.
- The overall goal: Closing a window should trigger some action
- Challenge C: (script to open the data table and to create the report attached: 2022Q1_ChallengeC_starterScript.jsl)
- You have: A Graph Builder report on Growth Measurements sample data.
- You want: When clicking on a line or selecting multiple lines (or categories in the legend), you want to generate a subset of the selected rows.
- The overall goal: Clicking on a graph or report should trigger some action
You can work on as many challenges as you like. You can/should submit your answers directly as a reply to this thread.
!!! When submitting, please start in the first line with what challenge your reply refers to, e.g.
CHALLENGE A:
This is my answer...
// this is my code
...
In the next meeting (18 May 2022) we will present some of the answers and I will mark the best answers as solution to this thread.
Looking forward to your submissions 
2022_Q1 Video: Welcome and Introduction to the Steering Committee2022_Q1 Video and files: Practical session for JSL BeginnersAbstract:
Use JMP's "Save Script" functionality to generate scripts and understand what has been generated. Learn the Basics of the Script Editor and where to find more information on the code generated.
Hi there,
in the 2022 Q1 meeting we will have a beginners session to provide some first guidance on how to start with scripting (this is not comparable to a scripting training or the equivalent e-Learning). It is really to get to know the very basic stuff you should get familiar with even before you learn the scripting concepts available.
In the attached journal there is a text base flow on what we will go through during this 30min session plus some information on the JMP Script Editor and further resources.
Best,
Martin
_Re: 2022Q1 Practical Session - BeginnersHi @Ressel
I moved this discussion into a seperate Thread (https://community.jmp.com/t5/JMP-Scripting-Users-Group/Question-on-the-table-references-from-Russel/m-p/461463#M11 ) so others can provide their guidance as well. This way we can have questions asked here and reference to a seperate thread and see all questions in a condensed way (hopefully
), and we can mark there the best answers as solutions, which would be difficult here if there are more questions.
Best,
Martin
Re: 2022Q1 Practical Session - BeginnersQuestion on the table references you showed today: If you process multiple tables sequentially as part of a script, do you iterate the table references ad infinitum (dt1, dt2, dt3,...) or is there a smarter solution?
Background: I frequently manipulate tables (join, concatenate, split, etc.) and sometimes have quite a few tables that I sequentially open, process and close before moving on to the next table in the same script until I have the final table I want.
2022_Q1 Video and files: JSL -Good Programming Skills @accantecAre you beyond "Hello World"? Have you already adapted existing JMP scripts or even developed them on your own? Do you ask yourself every time if "that" type of Spaghetti Code could be programmed much more „beautiful“? If so, this is definitely the right presentation for you.
Starting from the "green field", we will introduce you our small but fine software architecture, that can be applied universally to your requirements. Which coding conventions make sense and what are the tricks to give a program a face (graphical user interface)?
2022_Q2 MakeOver Challange Review@jthi shares a review on the MakeOver Challange.
Please add your comments below.
2022_Q1 Video and files: Put JSL to work – practical JSL tips and Best Practices@martindemel , @DonMcCormack and @jthi share their tips and best practices to learn JSL.