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
Juli
Level III

Get a question box to adjust y-axis (JMP v. 16)

Hi all,

 

I want to make variability charts through my dataset. Here I have written the script below which does that. However, I would like to have a box show up and ask for y-axis limits for each of these charts. Then I can write min and max for the y-axis in the question box and it will adjust to this.

 

Is that possible to do in JSL? 

 

Names Default To Here(1);
sd = currentdatatable();
Fitmod = {}; 

summarize( sd, ByGroups = By( :Batch ) ); 
colList = sd << Get Column Names( Continuous, String );

New Window("My Report", For( i = 1, i <= Nitems( colList ), i++, For Each( {BG, group}, ByGroups, Vc = Variability Chart( Y( colList[i] ), X( :Person, :Day ), Show Group Means( 1 ), Where( :Batch == ByGroups[group] ), ); ); ); );

Best regards,

Julie 

 

Best regards,
Julie
3 REPLIES 3
txnelson
Super User

Re: Get a question box to adjust y-axis (JMP v. 16)

If you have 10  column and 5 batches, there will be 50 variability charts that will be produced.  Do you envision:

  1. Before each chart is created that a box will pop up and the min and max for the given Y column be typed in.
  2. Before any charts are run, that a window pops up that has min and max input boxes for all of the Y columns for each of the batches.  The user then goes through all mins and maxes setting the values. Once done, clicks on OK and then the script uses the inputted values as it produces each chart.
  3. After the charts are displayed, all of the mins and maxes for each Y column and batch are displayed.  The user then goes through each min and max and when done clicks OK and the all of the charts are updated based upon the inputted min and max values for each chart.

Any of these can be options can be handled in JSL.  I am concerned over the number of min and max values that could potentially have to be set.

It would be helpful if you could describe exactly how you envision the process working.

Jim
Juli
Level III

Re: Get a question box to adjust y-axis (JMP v. 16)

Dear Jim

 

I was thinking something similar to the below (I believe it is option 2 - though I am not entirely sure what the difference between 1 and 2 is):

Juli_2-1737464617305.png

 

Best regards,

Julie

 

 

Best regards,
Julie
txnelson
Super User

Re: Get a question box to adjust y-axis (JMP v. 16)

My first response is "how is this different from just clicking on the Y axis for each displayed chart, selecting Axis Settings and typing in the min and max;

txnelson_0-1737465745673.png

Secondly, if you want to pursue your suggested approach,  you will need to do some studying in the Scripting Guide to learn about creating a Modal Window that contains the Text Boxes and Number Edit or Text Edit boxes to input the users values.

Here is an example taken directly from the Scripting Index

     Help=>Scripting Index=>Modal=>Dialog

txnelson_1-1737466605395.png

that provides an example of creating an input dialog window for user input.

Besides the Scripting Guide and the Scripting Index, there are a large number of Discussion Forum entries that you can search through to see how others have solved similar needs.

Also, under the Learn JMP icon at the top of this webpage, there is a complete section on Automation and Scripting that might be the best starting point.

Finally, when, during your development, if you come across an issue you do not understand, or need a pointer to what JSL function can be used to solve the problem, you always have the JMP Discussion Community to ask the question too.

Jim