14.03.2014 Views

Scripting Guide - SAS

Scripting Guide - SAS

Scripting Guide - SAS

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

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

Graphing Elements<br />

The ZColor values must be numeric codes, rather than names. You can use the color menu indices<br />

(0=black, 1=grey, 2=white, 3=red, 4=green, 5=blue, and so on) found in “Colors” on page 415.<br />

The following example script uses the Gradient function, with the picture showing two frames of the<br />

animation.<br />

phase = 0.7;<br />

New Window( "Gradient Function",<br />

a = Graph(<br />

FrameSize( 400, 400 ),<br />

X Scale( -5, 5 ),<br />

Y Scale( -5, 5 ),<br />

DoubleBuffer,<br />

Gradient Function(<br />

phase * Sine( x ) * Sine( y ) + (1 - phase) * Cosine( x ) * Cosine( y<br />

),<br />

x,<br />

y,<br />

[-1 1],<br />

zcolor( [0, 2] )<br />

)<br />

)<br />

);<br />

b = a[FrameBox( 1 )];<br />

For( i = 1, i

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

Saved successfully!

Ooh no, something went wrong!