use spinbox for interactive dialog<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />I'm trying to use a SpinBox in an interactive dialog. I want to use the value from the spin control to move across different columns of a data table
Here is my script as it exists now. It displays the overlay plot and the spin control but never updates the plot. I see in the documentation how it works with the Slider control and the GraphBox.
Names Default To Here( 1 );
Clear Globals();
// Load a processed data table and a wrapup data table. Addressable as dp and dw
Set Current Directory( "C:\Users\if1450\My Documents\JMP Test Area" );
dp = Open( "Test_Case_Data.jmp" );
SpinValue = 1;
This_Column = "MF " || Char( SpinValue );
pd = New Window( "Parse Data",
Outline Box( "Overlay Graph",
V List Box(
op = Overlay Plot(
X( :Temperature ),
Y( As Column( This_Column ) << get name ),
Separate Axes( 1 ),
Connect Thru Missing( 1 )
),
Lineup Box(
2,
nb = Number Edit Box( 2 ),
sb = Spin Box(
Function( {value},
nb << Increment( value );
SpinValue = nb << get;
This_Column = "MF " || Char( SpinValue );
op << reshow;
)
)
),
)
)
);
nb << Set Increment( 1 );
I have attached the script and the data table.
Re: use spinbox for interactive dialogWhat version of JMP are you using? In 11.2 it runs fine, time after time.
Re: use spinbox for interactive dialogI still have kinda weird behavior. If I restart JMP then the script works fine, but after closing the dialog and restarting the script the column switcher diesn't work
Here is the updated script using the same data table
Names Default To Here( 1 );
Clear Globals();
// Load a processed data table and a wrapup data table. Addressable as dp and dw
Set Current Directory( "C:\Users\if1450\My Documents\JMP Test Area" );
dp = Open( "Test_Case_Data.jmp" );
AllCols = dp << get Column Names( );
AllCols = AllCols[2 :: N Items(AllCols)];
pd = New Window( "Parse Data",
Outline Box( "Overlay Graph",
V List Box(
op = Overlay Plot(
X( :Temperature ),
Y( :MF 1 ),
Separate Axes( 1 ),
Connect Thru Missing( 1 )
)
)
)
);
cs = op << Column Switcher(:MF 1, AllCols);
cs << Set N Lines (5);
Re: use spinbox for interactive dialogPete,
As I kept looking around everywhere I stumbled upon Column Switcher. It seems to work great. I see I can also add it as a scriptable object outside of the oneway call. That helps me set its attributes. Hope to run into you in San Diego.
Gene
Re: use spinbox for interactive dialogHave you tried the column switcher? Does the same thing essentially.
dt = open("$sample_data\Bands Data.jmp");
op = dt << Overlay Plot(
X( :solvent pct ),
Y( :proof cut ),
Separate Axes( 1 ),
Column Switcher(
proof cut,
{proof cut, viscosity, caliper, ink temperature, humidity, roughness,
blade pressure, varnish pct, press speed, ink pct, ESA Voltage, ESA Amperage,
wax, hardener, roller durometer, current density, anode space ratio,
chrome content}
)
)