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: color, graphical representation (symbol) and size of each point of a data matrix can be specified.

Link:
Usage: setmaskp(data, color_num, art_num, size)
Input:
data n x p matrix of data which should be plotted
color_num either integer (all points of the data matrix get the color associated with that integer) <br> or a (n x 1) vector of integers (each point gets the color associated with the integer in the corresponding row); 0 : black, 1 : blue, 2 : green, 3 : cyan, 4 : red, 5 : magenta, 6 : yellow, 7 : white. In case you want to use the RGB colors, use the command createcolor. Then color_num has to be given either as a 1 x 3 vector of integers (all points get the same RGB color associated with the 3 integers) or an (n x 3) vector of integers (each point gets the RGB color associated with 3 the integers in the corresponding row).
art_num either integer (all points of the data matrix are represented by the symbol associated with that integer) or an (n x 1) vector of integers (each point is represented by the symbol associated with the integer in the corresponding row): 0 : empty, 1 : a point, 2 : a rectangle, 3 : a circle, 4 : a triangle, 5 : an X-symbol, 6 : a rhombus, 7 : a filled rectangle, 8 : a filled circle, 9 : a filled rhombus, 10 : a filled triangle, 11 : a cross, 12 : a star, 13 : a grid, 14 : a different cross
size either a scalar integer (all points of the data matrix 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:
A display where all points of the
data matrix 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:
The first 25 points of the graph are shown as red circles,
the next 25 points as red triangles, the third 25 points
as  magenta crosses and the last 25 points as magenta
rhombuses.



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