Subscribe Bookmark RSS Feed

Can't perform "Recall" in GUI for Variability Charts Produced from JSL

ylee

Community Trekker

Joined:

Nov 16, 2016

Hello JMP-ers/JSL-ers,

 

I generated a Variability Chart using JSL.  Example of script below.

 

After the chart is generated in JMP, I'd like to analyze further by changing the input to the Variability Chart.  Example, swapping :Lot and :Machine in the X field.  To do that quickly and easily, I'd click the Variability Chart icon on the JMP table (already opened), and click Recall, so that I can modify from there (through GUI) to the new configuration I like.

 

However, clicking Recall did not work - it did not bring back the configuration previously generated from JSL.

 

Any known workaround to get to what I wanted to do?

 

Thank you.

 

 

infile = "C:/" || "Diameter" || ".jmp";
jmpExists = 1;
if (
    File Exists (infile), dt = Open (infile),
    jmpExists = 0;
);
if (jmpExists == 1,
    w1 = New Window( "Variability Chart",
        OutlineBox("Variability Chart for Diameter",
            V List Box(
                Variability Chart(
                    Y( :Measurement ),
                    X( :Lot, :Machine, :Material, :Batch, :Year, :Month ),
                    Analysis Type( Name( "Choose best analysis (EMS REML Bayesian)" ) ),
                    Process Variation( 0 ),
                    Std Dev Chart( 0 ),
                    Show Box Plots( 1 ),
                    Points Jittered( 1 ),
                    Show Separators( 1 ),
                    Show Range Bars ( 0 ),
                    By( :Test_Facility ),
                    SendToReport(
                        Dispatch( {"Variability Gauge Test_Facility=Vietnam","Variability Chart for Measurement"},"2",ScaleBox,
                            {
                                Label Row( Show Major Grid( 1 ) )
                            }
                        ),
                        Dispatch( {"Variability Gauge Test_Facility=China","Variability Chart for Measurement"},"2",ScaleBox,
                            {
                                Label Row( Show Major Grid( 1 ) )
                            }
                        ),
                    )
                )
            )
        ),
    ),
);
3 REPLIES
txnelson

Super User

Joined:

Jun 22, 2012

Because you did not use the GUI to run the Variability Platform, the Recall capability will not be available.  What I suggest you do, is from the  red triangle in the output display, go to:

     Redo==>Relaunch Analysis

It will bring up the GUI with the values filled in

Jim
ylee

Community Trekker

Joined:

Nov 16, 2016

Hello Jim,

 

Thank you for the suggestion, it works better than recalling those parameters manually.

 

One more question, if I may.  In order to format the Variability Charts, such as Show Major Grid, or Rotated Tick Label, as you could see from my JSL, there is a part where it needs to be hardcoded -- because it is plotted By :Test_Facility, the Dispatch needs to call for EACH of the Test_Facility, i.e. Vietnam and China.  This creates a problem where (1) Test_Facility could change from data table to data table (it's a variable), and (2) repeated (thus very long) codes need to be written in the case where we have many Test_Facility.

 

I wonder if there's a better / smarter way to code this?

 

txnelson

Super User

Joined:

Jun 22, 2012

Your hardcoded components in your Variability Chart can be dealtwith differently.  In the script that you generated from the Variablity Chart, what is actually happening is that after the chart is created, the part of the code under "SendToReport" is actually sending a message to the report object for the chart.  Every separate object in the displayed report can be referenced in JSL.  So what you need to explore is the report object.  Chapter 11 in the Scripting Guide

     Help==>Books==>Scripting Guide

is a good source to get started with.  But the definative documentation is the Scripting Index

     Help==>Scripting Index

For your specific example, what the SendToReport code is doing, is actually sending information to one of the AxisBox objects of the graph.  To illustrate how you can change your "Show Major Grid" without having to be incumbered with all of the requirements of keeping track of the different names, etc, you can go to

     Help==>Scripting Index==>Show Major Grid

And there you will see documentation, and an example of how to do this.  The example from the indes is:

Names Default To Here( 1 );
Open( "$SAMPLE_DATA/Big Class.jmp" );
biv = Bivariate(
	Y( :weight ),
	X( :height ),
	FitLine
);
rbiv = biv << report;
axisbox = rbiv[axis box( 1 )];
axisbox << Show Major Grid( 1 );

In the example, there is no mention of the actual column names when setting the Major Grid.  However, it is pointing to Axis Box (1)..  In this example there is an axisbox for each axis, so there is AxisBox(1) and AxisBox(2).  Different platforms will have different configuations.  What your task will be, is to open the Tree Structure for the given output report and determine which object you need to deal with.  To do this, go to the Gray Triangle that when clicked on will expand and collapse areas within your output.  Right Click on the triangle and select

     Edit==>Show Tree Structure

I suggest that you start this with the example above, rather than your Variability Chart, so you won't get overwhelmed.

It is very, very powerful

Jim