Subscribe Bookmark RSS Feed

Updating pre-selected column group based on user input

rahulsmils

Occasional Contributor

Joined:

Sep 23, 2016

I am trying to plot something on variability chart repeatedly with same X values but different Y.

Initially, I made X as one variable and subsequent code refers to the same X with different Y every time:

//-------------Begin code------------------

dt << Group Columns( "xlist", {:oceans, :continents, :volcanoes} );

//-------- Call variability charts-------//

Variability Chart(

  Y( :Name( "Planet" ) ),

  X(dt << get column group( "xlist" )),

..........

//------------End Code--------------------

Right now I have three columns in xlist: oceans,continents,volcanoes, which go to X argument list of Variability chart.

Assume there are 100 more columns like this in data table.

1) I want to present the user a choice to edit contents of xlist in a GUI pop-up window.

The user can add more columns or delete any of pre-selected columns.

He may choose to not to modify anything and this list goes unedited to X variable then.

2) I wish the order of items passed to the argument is retained.

Right now the variability chart does not retain the original sequence of items while arranging on the x-axis.

Perhaps get column group( "xlist" ) returns the contents in a different order than assigned to xlist.

I tried it using lists and Eval but it did not help to retain order.

I wish to control the order of x-arguments when they are plotted on variability chart.

Please suggest the best way of implementing this.

Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions
Solution

Names Default To Here(1);

dt = Open("$SAMPLE_DATA/Big Class.jmp");

cd = Column Dialog(xvar = ColList("X", columns({age, sex, name})));

// Group columns (if really necessary)

Eval(Eval Expr(dt << group columns("xlist", Expr(cd["xvar"]))));

// Chart directly, without using group, to retain order

Variability Chart(Y(:Name("weight")), X(cd["xvar"]));

// Charting using column group will

// return col order that may differ from user input

Variability Chart(Y(:Name("weight")), X(dt << get column group("xlist")));

2 REPLIES
txnelson

Super User

Joined:

Jun 22, 2012

What you appear to be asking is for is an example of how to develop a dialog box which takes user input and then generates a specific analysis based upon that input.  The following example, from the JMP, File Exchange does that.  Now while it isn't using the Variability Platform, you should be able to get an idea on how to use the example so that you can put your specifics into it's methodology.

Runs Test (Wald-Wolfowitz Test) and JSL Implementation of JMP Platform Dialog Box

Jim
Solution

Names Default To Here(1);

dt = Open("$SAMPLE_DATA/Big Class.jmp");

cd = Column Dialog(xvar = ColList("X", columns({age, sex, name})));

// Group columns (if really necessary)

Eval(Eval Expr(dt << group columns("xlist", Expr(cd["xvar"]))));

// Chart directly, without using group, to retain order

Variability Chart(Y(:Name("weight")), X(cd["xvar"]));

// Charting using column group will

// return col order that may differ from user input

Variability Chart(Y(:Name("weight")), X(dt << get column group("xlist")));