Initial release of Maemo 5 port of gnuplot
[gnuplot] / demo / mouselab_1.dem
1 #
2 # $Id: mouselab_1.dem,v 1.1 2006/07/10 19:49:54 sfeam Exp $
3 #
4 # Demonstrate screen interaction using mouse variables
5 #
6 #     MOUSE_X MOUSE_Y MOUSE_KEY MOUSE_CHAR
7 #
8 # On entry, LID is the identifier for the previous label
9 #
10 LID = LID + 1
11 set label 2 sprintf(">>> READY FOR LABEL %d <<<",LID-100) 
12 set label 2 at graph .02, graph .65 tc lt (LID-100)
13 replot
14
15 #
16 # Get mouse position and first character of label
17 #
18 pause mouse key
19 LABEL = MOUSE_CHAR
20 LABEL_X = MOUSE_X
21 LABEL_Y = MOUSE_Y
22 set label LID LABEL at LABEL_X, LABEL_Y
23 replot
24 #
25 # Call routine that catches keystrokes one by one and
26 # updates the label
27 #
28 load "mouselab_2.dem"
29 #
30 # Print out final label details
31 #
32 show label LID
33
34 #
35 # Loop until we see an <esc>
36 #
37 if (MOUSE_KEY != 27) reread