sort by name
[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 == 2012230026 ? 0x0000ff : \
31 pn == 2012230028 ? 0xff00ff : \
32 pn == 2012230018 ? 0xff00ff : \
33 pn == 2012230011 ? 0x00ffff : \
34 0xff00ff )
35
36 plot "/dev/shm/location.txt" using 1:2:(map_color($6)) with points notitle linecolor rgbcolor variable pointtype 0
37
38 set tmargin 0
39
40 set ylabel "Y degrees"
41 plot "/dev/shm/location.txt" using 1:3:(map_color($6)) with points notitle linecolor rgbcolor variable pointtype 0
42
43 set tmargin 0
44
45 set xlabel "time"
46 set format x "%d.%m."
47
48 set ylabel "celsius"
49 set yrange [ * : * ]
50
51 plot "/dev/shm/location.txt" using 1:4:(map_color($6)) with points notitle lc rgbcolor variable pointtype 0
52