Share your ideas for the JMP Scripting Unsession at Discovery Summit by September 17th. We hope to see you there!
Choose Language Hide Translation Bar
Highlighted
shasheminassab
Level III

Change layout in Graph Builder using Page

When I drop a parameter in the "Page" section of the Graph Builder several maps are generated on top of each other. Is there any way to change the layout so I get more graphs per row? I see there is such option in Distribution platform "Arrange in Rows".

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Jeff_Perkinson
Community Manager Community Manager

Re: Change layout in Graph Builder using Page

Unfortunately, there's no option for the Page role to form a grid. Please enter it in the Wish List to get support from other members and get it in to a future release of JMP.

-Jeff

View solution in original post

5 REPLIES 5
Highlighted
Jeff_Perkinson
Community Manager Community Manager

Re: Change layout in Graph Builder using Page

Does the Wrap role get you what you want?

 

WrapRole.gif

 

 

-Jeff
Highlighted
shasheminassab
Level III

Re: Change layout in Graph Builder using Page

Wrap uses similar scale for all charts. I need to have completely different scales for each plot that's why I am using Page. I basically want the same matrix of graph that Wrap makes but with different scales. Page is a great solution only if I can change the layout of the plots.

Highlighted
Jeff_Perkinson
Community Manager Community Manager

Re: Change layout in Graph Builder using Page

Unfortunately, there's no option for the Page role to form a grid. Please enter it in the Wish List to get support from other members and get it in to a future release of JMP.

-Jeff

View solution in original post

Highlighted
gzmorgan0
Super User

Re: Change layout in Graph Builder using Page

@shasheminassab,

 

JMP is great is implementing new features, but it is always frustrating when you need something now. There is a method to meet your needs, but it might require learning a little scripting, seeing the pattern to modify the script provided below.  The attached script includes two examples.  

 

A JMP display box, called a LineUpBox, is the object that allows reorganizing the layout for the Distribution report. So until GraphBuilder has the feature Jeff Perkinson suggested you request, you can do this with a script. Below is a screen shot of a 5 column layout for the SATByYear.jmp data table  witha GraphBuilder plot for each state.

You might have to try different sizes to meet your needs when you change the layout, the number of columns ncol().

 

image.png

 

The script opens a table, and then New Window() creates a report. Then there is a LineupBox() wrappper with a GraphBuilder using the By option instead of Page.  I added a couple waits to the script so you can see one layout and then send a message to change the layout.  I hope this will help meet your needs until it is built-in.

 

Eaxmple #1 Script, picture not shown

//Example #1
dt1 = Open( "$Sample_Data/Cholesterol Stacked.jmp" );

dt1 << Color by Column(:Treatment);
New Window( "Custom Layout",
	lub1 = Lineup Box( N Col( 2 ),
		gb1 = dt1 << Graph Builder(
			By( :Treatment ),
			Size( 614, 480 ),
			Show Control Panel( 0 ),
			Variables( X( :Month ), Y( :Y ), Group Y( :Name( "AM/PM" ) )),
			Elements( Points( X, Y), Line( X, Y, )  )
		)
	)  //end lineup box
); //end new window

wait(2);
lub1 << ncol(3);       // new layout 3 columns
gb1 << size(447,480);  //resize

Example #2 script, picture shown above.

//Example #2
dt2 = Open("$sample_Data/SATByYear.jmp");


New Window( "Custom Layout - SAT Example",
	lub2 = Lineup Box( N Col( 5 ),
		gb2 = dt2 << Graph Builder(
			By( :State ),
			Size( 333, 250 ),
			Show Control Panel( 0 ),
			Show Legend(0),
			Variables( X( :Year ), Y( :SAT Verbal ), Y( :SAT Math) ),
			Elements( 
				Position( 1, 1 ),
			    Points( X, Y), 
			    Line( X, Y, )  
			),
			Elements( 
				Position( 1, 2 ),
			    Points( X, Y), 
			    Line( X, Y, )  
			),

		)
	)  //end lineup box
); //end new window

wait(2);
gb2 << Size(266,200);
Highlighted
shasheminassab
Level III

Re: Change layout in Graph Builder using Page

This is great @gzmorgan0 . Thanks for the code.

 

Article Labels