Hi All,
I have been working on this idea for the past week or so and @gzmorgan0 helped me with this post
https://community.jmp.com/t5/Discussions/creating-an-index-for-columns-to-point-to-the-graph/m-p/715...
say for example, I loop through 5 continuous columns and 2 nominal columns, I plot one way analysis of 10 columns(say nw2). I get the p-value and other parameters in a table. I want the table sorted in an ascending order of p-value. Can I have my table in a new window(nw1) and each of the row(as the row has both the appropriate X and Y axis relating to the graph) in the table should reference to the appropriate graph in the nw2? Is Table Box (Data table col box) the right strategy or there is some other function I should be looking into?
I appreciate any input/comments/suggestions.
Names Default To Here( 1 );
dt = Open( "$Sample_Data/Big Class.jmp" );
ynames = {"weight", "height"};
xnames = {"sex", "age"};
pnames = {};
nw2 = New Window( "Custom Display", vl = V List Box() );
nw2 << Size Window( 724, 395 );
For( i = 1, i <= N Items( ynames ), i++,
For( j = 1, j <= N Items( xnames ), j++,
Insert Into( pnames, ynames[i] || " by " || xnames[j] );
vl << Append(
Oneway(
Y( Column( dt, ynames[i] ) ),
X( Column( dt, xnames[j] ) ),
Box Plots( 1 ),
Comparison Circles( 0 ),
X Axis Proportional( 0 ),
Means Diamonds( 1 ),
Points Jittered( 1 ),
SendToReport(
Dispatch(
{},
"Oneway",
OutlineBox,
{Set Title( Eval Insert( "^ynames[i]^ ^xnames[j]^ Comparison Report" ) )}
)
)
)
);
); //end for j
); //end for i
plb = List Box( pnames, width( 100 ), maxSelected( 1 ) );
nw1 = New Window( "Filter", plb );
_xx = (nw2 << Child) << xpath( "//OutlineBox[@helpKey='Oneway Report']" );
plb << Set Function(
Function( {this},
k = (this << get Selected Indices)[1];
nw2 << Scroll Window( _xx[k] );
)
);
nw1 << Bring Window to Front;
nw2 << Bring Window to Front;
nw1 << Move Window( 10, 10 );
nw2 << move Window( 180, 10 );
//Add a try in case the window is already closed
nw2 << On close( Try( nw1 << Close Window() ) );