Tree Structure with group platformHi,
I cannot seem to access items in the tree structure of a platform whenever I specify a variable in the By argument. Is there something with the "Group Platform" property I must reference first?
What I want to do is change the style of the tablist to a combo box.
Thanks
Automation and ScriptingRe: Tree Structure with group platformHi @rcast15 ,
I'm not quite sure what it is that you're after. Can you provide some more details so that it's easier to understand the dilemma you're having. Is this a JSL problem? Which specific platform or analysis are you using? Do you have a script or data table you can share, or screenshots to share that can help to explain things?
Thanks!,
DS
Re: Tree Structure with group platformNames Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Drug.jmp" );
obj = dt << Multivariate(
Y( :x, :y ),
Variance Estimation( "Row-wise" ),
Scatterplot Matrix( 1 ),
By( :Drug ),
Group Options( Layout( "Arrange in Tabs" ) )
);
report = Report(obj);
report[TabListBox(1)] << set style("combo");
Here is an example of what I am trying to do. I want to script the style of the tab box to combo but I am getting an error. I expect it has to do with the tree structure I am referencing
Re: Tree Structure with group platformSince there are multiple multivariate plots, obj is a list. I had success going this route:
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Drug.jmp" );
obj = dt << Multivariate(
Y( :x, :y ),
Variance Estimation( "Row-wise" ),
Scatterplot Matrix( 1 ),
By( :Drug ),
Group Options( Layout( "Arrange in Tabs" ) )
);
(Get Window( obj[1] ) << XPath( "//TabListBox" ))[1] << Set Style( "Combo" );
Re: Tree Structure with group platformThank you very much @mmarchandFSLR. The code works well, however when I try to append the output anywhere in a new window I get an error message. I want to put the output in a V or H list box inside of a new window I am creating. Any thoughts?
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Drug.jmp" );
// THIS WORKS
obj = dt << Multivariate(
Y( :x, :y ),
Variance Estimation( "Row-wise" ),
Scatterplot Matrix( 1 ),
By( :Drug ),
Group Options( Layout( "Arrange in Tabs" ) )
);
(Get Window( obj[1] ) << XPath( "//TabListBox" ))[1] << Set Style( "Combo" );
// DOES NOT WORK
obj_expr = Expr(
obj = dt << Multivariate(
Y( :x, :y ),
Variance Estimation( "Row-wise" ),
Scatterplot Matrix( 1 ),
By( :Drug ),
Group Options( Layout( "Arrange in Tabs" ) )
);
(Get Window( obj[1] ) << XPath( "//TabListBox" ))[1] << Set Style( "Combo" );
);
New Window( "Example", OB_1 = Outline Box( "Analysis", obj_expr ) );
Re: Tree Structure with group platformYou can also avoid having the list of objects by using Group Options(Return Group(1)) which can sometimes be useful
Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
obj = dt << Bivariate(
X(:height),
Y(:weight),
By(:age),
Group Options(Return Group(1))
);
// show(obj); // Group Platform[]
obj << Layout("Arrange in Tabs");
Report(obj)[TabListBox(1)] << Set Style("Combo");Re: Tree Structure with group platformOh awesome Jarmo! I did not know the return group was even an option. Thanks
-Robert
Re: Tree Structure with group platformAlso, to with your Expr() approach, something like this should work
Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Drug.jmp");
obj_expr = Expr(
obj = dt << Multivariate(
Y(:x, :y),
Variance Estimation("Row-wise"),
Scatterplot Matrix(1),
By(:Drug),
Group Options(Return Group(1), Layout("Arrange in Tabs"))
);
Report(obj)[TabListBox(1)] << Set Style("Combo");
);
nw = New Window("Example", OB_1 = Outline Box("Analysis", obj_expr));
But you could also consider something like
Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Drug.jmp");
obj_expr = Expr(
obj = dt << Multivariate(
Y(:x, :y),
Variance Estimation("Row-wise"),
Scatterplot Matrix(1),
By(:Drug),
Group Options(Return Group(1), Layout("Arrange in Tabs"))
);
);
nw = New Window("Example",
OB_1 = Outline Box("Analysis",
multivar = obj_expr
)
);
Report(multivar)[TabListBox(1)] << Set Style("Combo");