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.

Chapter 12 <strong>Scripting</strong> Graphs 403<br />

Graphing Elements<br />

Figure 12.8 Gradient Function<br />

Getting the Properties of a Graphics Frame<br />

There are several functions that are useful for getting properties of an existing graphics frame<br />

H Size<br />

V Size<br />

X Origin<br />

Returns the horizontal size of the graphics frame in pixels.<br />

Returns the vertical size of the graphics frame in pixels.<br />

Returns the distance from the left to right edge of the displaybox.<br />

X Range<br />

Y Origin<br />

Y Range<br />

Returns the x-value for the left edge of the graphics frame.<br />

Returns the y-value for the bottom edge of the graphics frame.<br />

Returns the distance from the bottom to top edges of a display box.<br />

Examples:<br />

The first line calculates the right edge, and the second line calculates the top edge.<br />

Adding a Legend<br />

rightEdge = X Origin() + X Range();<br />

topEdge = Y Origin() + Y Range();<br />

You can add a legend to a graph, using the Row Legend command. The following example uses the<br />

Fitness.jmp sample data file, and sets colors and markers based on the Age column, and adds a legend to the<br />

plot.<br />

biv = Bivariate(Y(:Oxy), X(:Runtime)); //generate a scatterplot<br />

Report(biv)[Frame Box(1)]

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

Saved successfully!

Ooh no, something went wrong!