Keywords - Function groups - @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

 Quantlet: setmask Description: front-end for the setting of mask vectors that allows easy definitions for points, lines (polygons), surfaces and text.

Note:
Technically, setmask handles mask vectors that contain numerical information to control the graphical display of the data points. This explains the name of the function. Applying setmask to data that already have a mask vector results in an update of this mask vector. This update-effect can be avoided by using the "reset" keyword as the second input argument.

Example:
```library("plot")
;
; == defining display and some data sets ==========
;
; create a display two rows x three columns
pic=createdisplay(2,3)
n=20
; generate some 3D data
;   x standard normal distributed
;   z density of the standard normal distribution
x=normal(n,3)
y=sort(x[,1]~cos(x[,1]))
z=sort(grid(-3|-3,0.4|0.4,16|16),1:2)
z=z~prod(pdfn(z),2)
;
; == no mask -> default black medium circles ======
;
show(pic,1,1,x)
;
; == huge orange grids -> setmask takes rgb =======
;
; create orange as RGB color and change the layout ofx
orange=255~165~0
show(pic,1,2,x)
;
; == two groups of points =========================
;
; the first half of the points(1 - n/2) will become
; "cyan fillcircle", the second half(n/2+1 - n) red
; crosses
mycolor=string("cyan",1:n/2)|string("red",n/2+1:n)
mystyle=string("fillcircle",1:n/2)|string("cross",n/2+1:n)
; the "reset" command deletes all old settings
show(pic,1,3,x)
;
; == thick blue line, red left positioned text ====
;
mytext=string(" ",1:n) ; -> all strings blank
mytext[n]="cosine"     ; -> but last = "cosine"
show(pic,2,1,y)
;
; == red thin surface, green small filled rhombs ==
;
show(pic,2,2,z)
setgopt(pic,2,2,"title","ROTATE!")
;
; == differently colored numbers in circles  ======
;
; We create texts containing the numbers from 1 to n.
; Colors to the text are assigned by modulo division
; such that the colors runs from 0 to 6(7 = white is
; omitted)
mytext=string("%1.0f",1:n)  ; -> text = numbers
mycolor=(1:n)%7             ; -> numeric colors
show(pic,2,3,x)

```
Result:
```Creates a display with six plots.

The upper left window
shows a 3-dimensional data set in the default view
of the XploRe graphics as black circle.

The upper middle window uses an orange "grid" instead of the
black circles.

In the upper right window, the first half of
the points is displayed as cyan filled circles and the
second half as red crosses.

The lower right
window represents the data as large black circles with colored
text in them.

The lower middle window shows the graph of the density
function.

If you click with the mouse in any of the windows
mentioned before, you can rotate the data or graph
with the cursor keys.

In the lower left window, we see the cosine function (2D)
plotted as thick blue line with "cosine" written in red to the
left of the last line point.
```

Author: M. Mueller, S. Klinke, 20020409
(C) MD*TECH Method and Data Technologies, 05.02.2006