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

Group: Plot Manipulation
See also: setmaskl setmaskt show setmask createcolor

Function: setmaskp
Description: Use setmaskp to control the color, the graphical representation (symbol) and the size of each point of a datamatrix you want to plot. setmaskp has to preceed show. That is, first you call setmaskp to specify colour, graphical representation and size of the data you want to plot. Then you call show to actually plot the data.


Link:
Usage: setmaskp(data, color_num, art_num, size)
Input:
data (n x p) datamatrix
color_num either a scalar integer (all points of the datamatrix get the color associated with that integer) or a (n x 1) vector of integers (each point gets the color associated with the integer in the corresponding row); 0 is black, 1 is blue, 2 is green, 3 is cyan, 4 is red, 5 is magenta, 6 is yellow, 7 is white. &nl; In case you want to use RGB colors, create them first with the command createcolor. Then color_num has to be given either as a 1x3 vector of integers (all points get the same RGB color associated with the 3 integers) or a (n x 3) vector of integers (each point gets the RGB color associated with 3 the integers in the corresponding row)
art_num either a scalar integer (all points of the datamatrix get represented by the symbol associated with that integer) or a (n x 1) vector of integers (each point gets represented by the symbol associated with the integer in the corresponding row); 0 is empty, 1 is a point, 2 is a rectangle, 3 is a circle, 4 is a triangle, 5 is a X-symbol, 6 is a rhombus, 7 is a filled rectangle, 8 is a filled circle, 9 is a filled rhombus, 10 is a filled triangle, 11 is a cross, 12 is a star, 13 is a grid, 14 is a different cross
size either a scalar integer (all points of the datamatrix get the size associated with that integer) or a (n x 1) vector of integers (each point gets the size associated with the integer in the corresponding row); size may be one of the following integers: 0 ... 15; the default size is 8.

Note:

Example:

di=createdisplay(1, 1)
x=1:100
y=sin(x/20)+uniform(100, 1)/5
data=x~y
setmaskp(data, 4, 3, 8)
show(di, 1, 1, data)
Result:

all points of the datamatrix are coloured red (second argument equals 4),
are shown as circles (third argument equals 3) and have the standard
size (fourth argument equals 8).
Example:

di=createdisplay(1, 1)
x=1:100
y=sin(x/20)+uniform(100, 1)/10
data=x~y
color=4*matrix(50) | 5*matrix(50)
layout=3*matrix(25) | 4*matrix(25) | 5*matrix(25) | 6*matrix(25)
setmaskp(data, color, layout, 8)
show(di, 1, 1, data)
Result:

you see the first 25 points as red circles, 
second 25 point as red triangles, 
third 25 points as  magenta crosses 
and 25 last points as magenta rhombus.

Group: Plot Manipulation
See also: setmaskl setmaskt show setmask createcolor

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

(C) MD*TECH Method and Data Technologies, 17.8.2000