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: setbrushf link readevent

Function: setmode
Description: setmode sets the mouse mode of a plot.
0=ZOOM and INDEX
1=BRUSH
2=defines your own actions using readevent


Usage: setmode(di, l_num, c_num, mode)
Input:
di Display
l_num integer, 1 ... count of lines of di
c_num integer, 1 ... count of columns of di
mode 0 if you need the default mode (ZOOM and INDEX)
1 if you want to brush
2 if you want to define your own actions using readevent

Note:

Example:

di=createdisplay(1, 2)
x=1:100
y1=x~(sin(x/20)+uniform(100, 1)/10)
y2=x~(cos(x/20)+uniform(100, 1)/10)
setmaskp(y1, 4, 3, 8)
setmaskp(y2, 4, 3, 8)
show(di, 1, 1, y1)
show(di, 1, 2, y2)
link(di, 1, 1, di, 1, 2)
setmode(di, 1, 1, 1)
Result:

after the mouse cursor enters the left plot, you see a 
brush rectangle around the cursor. If you click a button
now, all the points that are in this rectangle are brushed.
Because of the link, the corresponding points in the right
plot will be black color too.

Group: Plot Manipulation
See also: setbrushf link readevent

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, 28.6.1999