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.

Appendix A JSL Syntax Reference 617<br />

Graphic Functions<br />

PixelRadius(n) A number that describes the length of the circle’s radius in pixels. If the vertical axis<br />

is resized, the circle is not resized.<br />

fill Optional: A color that is used to fill the circle.<br />

Note<br />

The center point and the radius can be placed in any order. You can also add additional center point and<br />

radius arguments and draw more than one circle in one statement. One point and several radii results in<br />

a bull’s-eye. Adding another point still draws all previous circles, and then adds an additional circle with<br />

the last radius specified. This means that this code:<br />

graphbox(circle({20, 30}, 5, {50, 50}, 15))<br />

results in three circles, not two. First, a circle with radius 5 is drawn at 20, 30. Second, a circle with<br />

radius 5 is drawn at 50, 50. Third, a circle with radius 15 is drawn at 50, 50. Note that fill must be the<br />

last argument, and it is applied to all circles defined in this function.<br />

Color To HLS(color)<br />

Description<br />

Converts the color argument (including any JMP color) to a list of HLS values.<br />

Returns<br />

A list of the hue, lightness, and saturation components of color. The values range between 0 and 1.<br />

Argument<br />

color a number from the JMP color index.<br />

Example<br />

The output from ColorToHLS() can either be assigned to a single list variable or to a list of three scalar<br />

variables:<br />

hls = colortohls(8);<br />

{h, l, s} = colortohls(8);<br />

show(hls, h, l, s);<br />

hls = {0.75, 0.529411764705883, 1}<br />

h = 0.75<br />

l = 0.529411764705883<br />

s = 1<br />

Color To RGB(color)<br />

Description<br />

Converts the color argument (including any JMP color) to a list of RGB values.<br />

Returns<br />

A list of the red, green, and blue components of color. The values range between 0 and 1.<br />

Argument<br />

color a number from the JMP color index.<br />

Example<br />

The output from ColorToRGB() can either be assigned to a single list variable or to a list of three scalar<br />

variables:<br />

rgb = colortorgb(8);<br />

{r, g, b} = colortorgb(8);

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

Saved successfully!

Ooh no, something went wrong!