14.03.2014 Views

Scripting Guide - SAS

Scripting Guide - SAS

Scripting Guide - SAS

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

338 Display Trees Chapter 11<br />

Manipulating Displays<br />

For example, open the Big Class sample data set and run the attached Bivariate script. This generates a<br />

report with a fitted line. Then, open the Lack of Fit outline node, and close the Analysis of Variance outline<br />

node. Finally, select Script > Save Script to Script Window. The following script appears. (spacing and<br />

line breaks are added here for illustration).<br />

Bivariate(<br />

Y( :weight ),<br />

X( :height ),<br />

Fit Line( {Line Color( {213, 72, 87} )} ),<br />

SendToReport(<br />

Dispatch( {"Linear Fit"}, "Lack Of Fit", OutlineBox, {Close( 0 )} ),<br />

Dispatch( {"Linear Fit"}, "Analysis of Variance", OutlineBox, {Close( 1<br />

)} )<br />

)<br />

);<br />

The Send To Report command contains two Dispatch commands. These correspond to your two<br />

customizations to the default report. Examine the first Dispatch command in detail.<br />

The first argument says to find an outline node named “Linear Fit”. The second and third commands say to<br />

further find an Outline Box named “Lack of Fit” underneath the “Linear Fit” outline. The fourth argument<br />

is the command to send to this outline box. In this case, the message is Close(0), in other words, open the<br />

node.<br />

Note: If there are several outline nodes with identical names, subscripts are assigned to them. For example,<br />

if you have a Bivariate analysis with two quadratic fits (resulting in identical titles), when you dispatch a<br />

command to the second fit, the subscript [2] is added to the duplicated title.<br />

The best way to deal with Send to Report and Dispatch commands is to first run a report using the mouse,<br />

creating the customizations interactively. Then, examine the script that JMP generates. Remember: the best<br />

JSL writer is JMP itself.<br />

Using the

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!