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.

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

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

)<br />

);<br />

Figure 12.10 Drawing Arrows<br />

This script compares drawing with a specified length (19 pixels) and drawing with the default arrow head<br />

size.<br />

New Window( "Arrow Heads", Graph Box(<br />

Frame Size( 300, 300 ), X Scale( 0, 100 ), Y Scale( 0, 220 ),<br />

x = 10; y1 = 10; y2 = y1 + 10;<br />

For( i = 1, i < 10, i++,<br />

Pen Color( "Red" );<br />

Arrow( {x, y1}, {x, y2} );<br />

y2 += 10; y1 += 100; y2 += 100;<br />

Pen Color( "Blue" );<br />

Arrow( 20, {x, y1}, {x, y2} );<br />

x += 10; y1 -= 100; y2 -= 100;<br />

Text Color( "Red" );<br />

Text( {10, 80}, "Without Length Arg" );<br />

Text Color( "Blue" );<br />

Text( {10, 200}, "With Length Arg" );<br />

);<br />

));

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

Saved successfully!

Ooh no, something went wrong!