Group: | Plot Manipulation |
See also: | 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) |
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)
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.