该帮助的版本不再更新,请参见https://www.jmp.com/support/help/zh-cn/15.2 获取最新的版本.


The optional order argument specifies in what order to draw the graphics element. The order can be the keyword Back or Front or an integer that specifies the drawing order for a number of graphics elements. For example, if you add an oval to a scatterplot, the oval is drawn on top of the markers. The keyword Back or 1 cause the oval to be drawn in the background. Front or 2 means the object is drawn first.
The optional Description argument is a string that appears in the Customize Graph window next to the graphics script.
To specify the drawing order for a number of graphics elements, use an integer for the order argument to determine where each is drawn in relation to the others. The following script first adds a blue oval and then adds a red oval over the blue oval. Both ovals are behind the points.
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
op = dt << Overlay Plot(
Report( op )[Frame Box( 1 )] << Add Graphics Script(
1, // draw the blue oval
Description( "Blue Oval" ),
Fill Color( "Blue" );
Oval( 60, 140, 65, 90, 1 );
Report( op )[Frame Box( 1 )] << Add Graphics Script(
2, // draw the red oval over the blue oval
Description( "Red Oval" ),
Fill Color( "Red" );
Oval( 50, 120, 65, 100, 1 );
图 12.3 Specifying the Drawing Order
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
biv = dt << Bivariate( y( :weight ), x( :height ) );
rbiv1 = biv << Report; // create a report object
rbiv2 = rbiv1 << Clone Box; // create a copy of the Bivariate graph
rbiv1 << Append( rbiv2 );
framebox1 = rbiv1[Frame Box( 1 )]; // assign references to the reports’ frame boxes
biv << Fit Line; // fit a line to the first Bivariate graph
framebox1 << Copy Frame Contents;
framebox2 << Paste Frame Contents;
图 12.4 Copying and Pasting Frame Contents
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
biv1 = dt << Bivariate( y( :weight ), x( :height ) );
rbiv1 = biv1 << Report; // create a report object
rbiv2 = rbiv1 << Clone Box; // create a copy of the Bivariate graph
rbiv1 << Append( rbiv2 );
framebox1 = rbiv1[Frame Box( 1 )]; // assign a reference to the reports’ frame boxes
framebox1 << Background Color( "Blue" );
framebox1 << Copy Frame Settings;
framebox2 << Paste Frame Settings;
图 12.5 Copying and Pasting the Background
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dist = dt << Distribution(
Nominal Distribution( Column( :age ) ),
{"Distributions sex=M", "age"},
"Distrib Nom Hist",
Hist Seg( 1 ),
Fill Color( "Light Yellow" ),
// set the histogram color for males
For( i = 2, i <= N Items( dist ), i++,
Report( dist[i] )[FrameBox( 1 )] << Copy Frame Contents;
// copy the the second histogram into the first histogram
Report( dist[1] )[FrameBox( 1 )] << Paste Frame Contents;
New Window( "Distribution", Outline Box( "age", Report( dist[1] )[Picture Box( 1 )] ) );
图 12.6 Pasted Histogram
1.
Right-click the graph and select Edit > Copy Frame Settings.
1.
Right-click the graph and select Edit > Copy Frame Contents.