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
anne_sa
Level VI

How to have an horizontal layout when using a By variable with the graph builder?

Hello everybody!

I would like to know how to display graphs horizontally when using a By variable with the graph Builder?

Here is a small example script:

Graph Builder(
Size( 528, 456 ),
Show Control Panel( 0 ),
Variables( X( :weight ), Y( :height ) ),
Elements( Points( X, Y, Legend( 1 ) ), Smoother( X, Y, Legend( 2 ) ) ),
By( :sex )
)

 

I get the following result:

Image1.png

 

And I would like to get this:

Image2.png

 

Any idea of how we could do that?

Thanks in advance!

1 ACCEPTED SOLUTION

Accepted Solutions

Re: How to have an horizontal layout when using a By variable with the graph builder?

Try this approach:

 

Names Default to Here( 1 );

dt = Open( "$SAMPLE_DATA/Big Class.jmp" );

New Window( "Side by Side",
	Line Up Box( N Col( 2 ),
		dt << Graph Builder(
			Size( 534, 456 ),
			Show Control Panel( 0 ),
			Variables( X( :height ), Y( :weight ) ),
			Elements( Points( X, Y, Legend( 3 ) ), Smoother( X, Y, Legend( 4 ) ) ),
			By( :sex )
		)	)
);

View solution in original post

2 REPLIES 2

Re: How to have an horizontal layout when using a By variable with the graph builder?

Try this approach:

 

Names Default to Here( 1 );

dt = Open( "$SAMPLE_DATA/Big Class.jmp" );

New Window( "Side by Side",
	Line Up Box( N Col( 2 ),
		dt << Graph Builder(
			Size( 534, 456 ),
			Show Control Panel( 0 ),
			Variables( X( :height ), Y( :weight ) ),
			Elements( Points( X, Y, Legend( 3 ) ), Smoother( X, Y, Legend( 4 ) ) ),
			By( :sex )
		)	)
);
anne_sa
Level VI

Re: How to have an horizontal layout when using a By variable with the graph builder?

Thanks @Mark_Bailey that's exactly what I was looking for!!

Recommended Articles