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.
Fit Polynomial( 4 )
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:
Now you can manipulate the display boxes in the report layer as described in the following sections.
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.
fbx = rbiv[Frame Box( 1 )];
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).
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.
biv = dt << Bivariate( Y( :weight ), X( :height ) );
Show Properties( biv );
Many messages are the same as items in the pop-up menu for a given object. The next section, Construct Custom Windows, discusses messages for common display boxes in more detail.
var = report[text];
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.
biv = dt << Bivariate(
Fit Polynomial( 4 )
var = rbiv[Display Box( "?text" )];
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.
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:
提示:To determine the index number of a display box, view the tree structure as described in View the Display Tree.
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.
If you want to identify an item nested several layers down in an outline box, use a subscript with more than one argument of any of the above types. After locating the first item, JMP looks inside that item for the next, and so on.
Example of Creating a Report shows how to extract parameter estimates from the report.
rp = dt << Bivariate(
图 11.7 Subscripted Display Box