update bakaceva 3 to use views for graph
[zc] / gnuplot / location.gnuplot
1 #set terminal pngcairo color size 800,600
2 #set output
3 set terminal canvas size 800,600 standalone mousing jsdir 'gnuplot' title 'Bakaceva 3'
4 # dpavlin@subvision:~/zc/www$ ln -sf /usr/share/gnuplot/gnuplot/5.4/js gnuplot
5 set output '/home/dpavlin/zc/www/location.html'
6
7 set xdata time
8 set timefmt "%Y-%m-%d %H:%M:%S"
9
10 set datafile separator ","
11
12 set grid
13 set key outside tmargin center
14
15 set format x ""
16
17 set multiplot layout 3,1
18
19 set lmargin at screen 0.125
20
21
22 set ylabel "X degrees"
23
24 # https://stackoverflow.com/questions/9082807/gnuplot-plot-points-with-color-based-values-in-one-string-column-and-show-strin
25
26 map_color(pn) = ( \
27 pn == 2012230015 ? 0xff0000 : \
28 pn == 2009210010 ? 0x00ff00 : \
29 pn == 2008050077 ? 0x0000ff : \
30 pn == 2012230028 ? 0xff00ff : \
31 pn == 2012230011 ? 0x00ffff : \
32 0xff00ff )
33
34 plot "/dev/shm/location.txt" using 1:2:(map_color($6)) with points notitle linecolor rgbcolor variable pointtype 0
35
36 set tmargin 0
37
38 set ylabel "Y degrees"
39 plot "/dev/shm/location.txt" using 1:3:(map_color($6)) with points notitle linecolor rgbcolor variable pointtype 0
40
41 set tmargin 0
42
43 set xlabel "time"
44 set format x "%d.%m."
45
46 set ylabel "celsius"
47 set yrange [ * : * ]
48
49 plot "/dev/shm/location.txt" using 1:4:(map_color($6)) with points notitle lc rgbcolor variable pointtype 0
50