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.

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

Drawing Lines, Arrows, Points, and Shapes<br />

Figure 12.12 Drawing Markers<br />

You can also include a row state argument before, after, or instead of the marker ID argument. By using<br />

Combine States, you can set multiple row states inside Marker. Try substituting each of these lines in the<br />

graph script above:<br />

marker(i, color state(i), {j*2, i});<br />

marker(color state(i), i, {j*2, i});<br />

marker(combine states(colorstate(i),markerstate(i),hiddenstate(i)),{j*2, i});<br />

Again, points can also be specified as matrices of x and then y coordinates.<br />

Pies and Arcs<br />

Pie and Arc draw wedges and arc segments. The first four arguments are x1, y1, x2, and y2, the<br />

coordinates of the rectangle to inscribe. The last two arguments are the starting and ending angle in degrees,<br />

where 0 degrees is 12 o'clock and the arc or slice is drawn clockwise from start to finish.<br />

New Window( "Pies and Arcs",<br />

Graph Box(<br />

framesize( 400, 400 ),<br />

X Scale( 0, 9 ),<br />

Y Scale( 0, 9 ),<br />

Fill Color( "Black" ), // top left<br />

Pie( 1.1, 7.9, 3.9, 5.1, 45, 270 ),<br />

Text( erased, {1.75, 6}, "1,8,4,5,45,270" ),<br />

Arc( 1, 8, 4, 5, 280, 35 ),<br />

Fill Color( "Red" ), // top right

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

Saved successfully!

Ooh no, something went wrong!