cd23e771f5cddbbabc98ee5487b71e97922c6798
[gnuplot] / demo / mouselabels.dem
1 #
2 # $Id: mouselabels.dem,v 1.2 2006/07/10 21:06:11 sfeam Exp $
3 #
4 # Demonstrate screen interaction using mouse variables
5 #
6 #     MOUSE_X MOUSE_Y MOUSE_KEY MOUSE_CHAR
7 #
8
9 set termoption enhanced
10
11 set title "Demo interactive placement of labels using mouse feedback"
12 set label 1 at graph 0.02, graph 0.9
13 set label 1 "Position mouse at desired start of label and start typing\nEnhanced text syntax may be used\nArrow keys will reposition label as you go\n   <del> or <bs> allows editing\n   <tab> to terminate this label\n   <esc> to terminate demo"
14
15 set border 0
16 unset xtics
17 unset ytics
18 set key box
19
20 plot sin(13*besj0(x))/x
21
22 #
23 # Initialize label identifier
24 #
25 LID = 100
26
27 #
28 # Loop over interactive placement of new labels
29 #
30 load "mouselab_1.dem"
31 show label
32
33 #
34 # All done with demo
35 #
36 unset label 1
37 set label 2 "DONE"
38 replot
39 pause -1 "Hit <cr> to continue"
40 reset