cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • New to JMP? Join us Sept. 23-24 for the Early User Edition of Discovery Summit, tailor-made for new users. Register now for free!
  • Use World Cup data to build models, explore spatial relationships, and create informative visualizations in JMP. Register. July 17, 2 pm US Eastern Time.
  • Your voice matters! Tell us how you prefer to receive JMP updates, so we can tailor our communication to your needs. Take short survey.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
rcast15
Level III

Tree Structure with group platform

Hi,

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

2 ACCEPTED SOLUTIONS

Accepted Solutions
mmarchandFSLR
Level VI

Re: Tree Structure with group platform

Since 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" );

View solution in original post

jthi
Super User

Re: Tree Structure with group platform

You 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");
-Jarmo

View solution in original post

7 REPLIES 7
SDF1
Super User

Re: Tree Structure with group platform

Hi @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

rcast15
Level III

Re: Tree Structure with group platform

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" ) )
);

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

mmarchandFSLR
Level VI

Re: Tree Structure with group platform

Since 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" );
rcast15
Level III

Re: Tree Structure with group platform

Thank 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 ) );
jthi
Super User

Re: Tree Structure with group platform

You 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");
-Jarmo
rcast15
Level III

Re: Tree Structure with group platform

Oh awesome Jarmo! I did not know the return group was even an option. Thanks

-Robert

jthi
Super User

Re: Tree Structure with group platform

Also, 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");
-Jarmo

Recommended Articles