Radio button on Graph builder to vary Variable Role("Y)Hi,
I want to create a RB where you can change three variables Resistance, Currents, Voltage using Radio buttons.
Here's what I have tried but something doesn't seem to be correct. Any advice?
Names Default To Here( 1 );
stk = Current Data Table();
col = stk << Get Column Names( "String" );
Resist = {};
curr = {};
Volt = {};
For( i = 1, i <= N Items( col ), i++,
If(
Contains( col[i], "Resistance" ),
Insert Into( Resist, col[i] ),
Contains( col[i], "Currents" ),
Insert Into( curr, col[i] ),
Contains( col[i], "Voltage" ),
Insert Into( Volt, col[i] ),
)
);
New Window( "",
H List Box(
V List Box(
Radio Box(
{"Resitance", "Currents", "Voltage"},
<<SETFUNCTION></SETFUNCTION> Thanks,
Jackie
Automation and ScriptingRe: Radio button on Graph builder to vary Variable Role("Y)I made quite a lot of small changes, fixing typos and so on
Names Default To Here(1);
stk = Open("$DOWNLOADS/datatable.jmp");
col = stk << Get Column Names("String");
Resist = {};
curr = {};
Volt = {};
For(i = 1, i <= N Items(col), i++,
If(
Contains(col[i], "Resistance"), Insert Into(Resist, col[i]),
Contains(col[i], "Currents"), Insert Into(curr, col[i]),
Contains(col[i], "Voltage"), Insert Into(Volt, col[i]),
show("?");
)
);
nw = New Window("",
H List Box(
V List Box(
Radio Box(
{"Resitance", "Currents", "Voltage"},
<<SETFUNCTION></SETFUNCTION>Re: Radio button on Graph builder to vary Variable Role("Y)Thanks @jthi. I noticed that the elements in the graph builder change after varying the RB. Is there a way I can retain the elements settings to box plot and histogram?
Elements( Box Plot( X( 1 ), X( 2 ), X( 3 ), X( 4 ), Legend( 2 ) ), Histogram( X( 1 ), X( 2 ), X( 3 ), X( 4 ), Legend( 3 ) ) )
Re: Radio button on Graph builder to vary Variable Role("Y)Depending on which options are changing easiest option might be to rebuild the Graph Builder when radio box option is changed. The format is fairly simple for this graph builder and creating expression/function for it isn't too bad ( Insert one expression into another using Eval Insert, Eval Expr, Parse, and Substitute is most likely needed for it)
Re: Radio button on Graph builder to vary Variable Role("Y)@jthi Thanks. I looked at the discussion but little confused. You mind sharing an example for reference?