This version of the Help is no longer updated. See JMP.com/help for the latest version.

.
Publication date: 07/30/2020

Customize Graphs

You can also make changes to graphs in a script. For example, create a window with a graph, get a reference to the report, and then set the frame box size.

dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
biv = dt << Bivariate( Y( :weight ), X( :height ), Fit Line );
rbiv = biv << Report;
rbiv[Frame Box( 1 )] << Frame Size( 400, 400 );

To see a list of possible messages for any given display box object, select Help > Scripting Index and select Display Boxes from the list. Running the Show Properties() command is an alternative to using the Scripting Index. For example, here is a partial list of messages that you can send to an axis:

dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
biv = dt << Bivariate( Y( :weight ), X( :height ), Fit Line );
rbiv = biv << Report;
Show Properties( rbiv[Axis Box( 1 )] );

Axis Settings [Action](Provides a way to bring up the axis dialog or set configurable axis options for a given axis.)

Revert Axis [Action](Restore the settings that this axis had originally.)

Add Axis Label [Action]

Remove Axis Label [Action]

...

The following expressions change the font of both axis labels (weight and height in the example above) to 12-point, italic Arial Black:

rbiv[Text Edit Box( 1 )] << Set Font( "Arial Black", 12, Italic );
rbiv[Text Edit Box( 2 )] << Set Font( "Arial Black", 12, Italic );

or

rbiv[Text Edit Box( 1 )] << Set Font( "Arial Black" );
rbiv[Text Edit Box( 1 )] << Set Font Style( "Italic" );
rbiv[Text Edit Box( 1 )] << Set Font Size( 12 );
rbiv[Text Edit Box( 1 )] << Set Font( "Arial Black" );
rbiv[Text Edit Box( 2 )] << Set Font Style( "Italic" );
rbiv[Text Edit Box( 2 )] << Set Font Size( 12 );
rbiv[Text Edit Box( 2 )] << Set Font Name( "Arial Black" ) << Set Font Size( 12 ) << Set Font Style( Italic )

The default font specified in the Preferences is applied if the font is not installed on the computer.

Want more information? Have questions? Get answers in the JMP User Community (community.jmp.com).