Is it possible to standardize graphs from graph builder, after they have been created, with regards to:
by applying JSL? Are there other ways to achieve this?
Here is a short script that will show you an example on how to do this....Documentation on this is in the Scripting Guide and the Scripting Index
Help==>Books==>Scripting Guide
Help==>Scripting Index
Names Default To Here( 1 ); Open( "$SAMPLE_DATA/Big Class.jmp" ); gb = Graph Builder( Size( 528, 484 ), Show Control Panel( 0 ), Variables( X( :sex ), Y( :height ), Group X( :age ) ), Elements( Box Plot( X, Y, Legend( 1 ) ) ) ); rgb = Report( gb ); // Set the size of the display rgb[Frame Box( 1 )] << Frame Size( 100, 300 ); // Set the title size rgb[Outline Box( 1 )][Text Box( 1 )] << set font size( 20 ); // Set axis font size rgb[AxisBox( 2 )] << label row( set font size( 14 ) );
Thanks for the reply Jim. The scripts are pointing in the right direction.
Is there a general approach, were I can run for example an add in, which transforms an created graph from graph builder into defined a standard graph size, standard title and axis size?
Names Default To Here( 1 ); Open( "$SAMPLE_DATA/Big Class.jmp" ); Graph Builder( Size( 528, 484 ), Show Control Panel( 0 ), Variables( X( :sex ), Y( :height ), Group X( :age ) ), Elements( Box Plot( X, Y, Legend( 1 ) ) ) ); // The code below could be put into an JMP Addin, and it would scan through all // of the windows and when the first Graph Builder output window is found, it // would set the standard settings // // The code could also be changed to display a list of all of the Graph Builder windows found // and the user could then select the one(s) to set // // There are other issues, since the Graph Builder can produce a multitude of // outputs. The setting of the graph area size, will vary based upon the // elements within the output display. i = 1; stop = "No"; While( Window( i ) << Get Window Title != {} & Stop == "No", If( Word( 2, Window( i ) << Get Window Title, "-" ) == " Graph Builder", stop = "Yes"; Break(); ); i++; ); If( stop == "Yes", // Set the size of the display Window( i )[Frame Box( 1 )] << Frame Size( 100, 300 ); // Set the title size Window( i )[Outline Box( 1 )][Text Box( 1 )] << set font size( 20 ); // Set axis font size Window( i )[AxisBox( 2 )] << label row( set font size( 14 ) ); );
Sorry for the late reply. I did try to built an add-in or run the code:
i = 1; stop = "No"; While( Window( i ) << Get Window Title != {} & Stop == "No", If( Word( 2, Window( i ) << Get Window Title, "-" ) == " Graph Builder", stop = "Yes"; Break(); ); i++; ); If( stop == "Yes", // Set the size of the display Window( i )[Frame Box( 1 )] << Frame Size( 100, 300 ); // Set the title size Window( i )[Outline Box( 1 )][Text Box( 1 )] << set font size( 20 ); // Set axis font size Window( i )[AxisBox( 2 )] << label row( set font size( 14 ) ); );
for other data sets with open graphs in graph builder. I could't see any changes or impact on the graphs. Am I missing something?
This is very neccessary! A script is not helpful as it is too cumbersome. I need an easy way to create several graphs of the same dimensions without always reverting to dragging around the window
Although it won't work after a graph is created, but in the Graph Builder preferences you can specify a graph height and graph width. This would apply then to every graph created by Graph Builder.