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


One of the messages that you can send a platform is the Report message. The Report message retrieves the display box that holds the report.
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
biv = dt << Bivariate( // biv references the analysis layer
To get a reference to the display box that represents the view of the platform, use the Report message. For example, add this expression to the preceding script:
rbiv = biv << Report; // rbiv references the report layer
The following example creates a Bivariate report and stores its reference in the rbiv report object. It then puts the rbiv report object in a frame box and assigns the fbx variable.
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
biv = dt << Bivariate( // biv references the analysis layer
Fit Mean( {Line Color( {57, 177, 67} )} )
rbiv = biv << Report; // assign rbiv to the report layer
fbx << Set Background Color( blue ); // colors the frame box in blue
The Set Background Color message works the same as right-clicking in the graph and selecting Background Color > Blue.
To find out which messages you can send to a frame box, select Help > Scripting Index and search for “frame box” (图 11.6).
图 11.6 Scripting Index Display Box List
Running the Show Properties() function is an alternative to using the Scripting Index. The messages for the specified display box are printed to the log.
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
biv = dt << Bivariate( Y( :weight ), X( :height ) );
This expression finds the display box in rpt that has the title text. Note that text must be the complete title, not just a substring of the title. The "text" argument can also be any expression that evaluates to a text string. This approach is less reliable than referring to the display box with a subscript because the string in a report can easily change.
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
biv = dt << Bivariate(
Fit Mean( {Line Color( {57, 177, 67} )} ),
rbiv = biv << Report; // return a reference to the Bivariate report
out1 = rbiv["? Mean"]; // find "Fit Mean" in the Bivariate report
out1 << Close( 0 ); // open the Fit Mean outline
This expression finds the outline box that contains the specified text string in the rbiv report. The out1 variable assigns a reference to the outline box.
rpt[Display Box ( n )];
The expression above finds the nth of the specified display box of the type boxType. For example, this expression finds the first outline box in the rbiv report and assigns it to the out1 variable:
var = rpt[arg1][arg2][arg3][...];
The expression above matches the last argument to a display box that is contained by the next to last argument’s outline node, which is in turn contained by the argument before the next to last, and so on. In other words, it is a way of digging down into the hierarchy of an outline tree to identify a nested display box.
rpt[arg1][arg2][arg3] // finds the first item then the next starting after that location, and so on
rpt[arg1, arg2, arg3] // different syntax, same result
Example of Creating a Report shows how to extract parameter estimates from the report.
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
rp = dt << Bivariate(
Fit Line( {Line Color( {213, 72, 87} )} )
Report( rp )[Outline Box( "Analysis of Variance" )][
// string references the parent box
Number Col Box( 1 )][3] // subscript references the child box
图 11.7 Subscripted Display Box