draw rtl 433mhz data on y2 axis with separate scale
[vaillant-thermostat] / temp2.gnuplot
1 set terminal pngcairo color size 600,800
2
3 set xdata time
4 set timefmt "%s"
5
6 set xtics format "%H"
7
8 set pointsize 0.2
9
10 set output '/dev/shm/temp2.png'
11
12 set multiplot
13 set size 1, 0.5
14
15 set origin 0.0, 0.5
16
17 if ( ! exists("t_mean")) {
18
19 t_mean=25
20 t_spread=25
21
22 h_mean = 50
23 h_spread = 30
24
25 print "using default mean and spread"
26 }
27
28 min_t = t_mean - t_spread
29 max_t = t_mean + t_spread
30
31 set ytics nomirror
32 set y2tics
33
34 plot "/dev/shm/DS18B20-temperature" using ($1+7200):($2 > min_t && $2 < max_t ? $2 : '') with dots title "DS18B20 deg. C" \
35 ,"/dev/shm/DHT22-temperature" using ($1+7200):($2 > min_t && $2 < max_t ? $2 : '') with dots title "DHT22 deg. C" \
36 ,"/dev/shm/rtl_433-temperature" using ($1+7200):($2) with dots title "RTL433 deg. C" axes x1y2
37
38 set origin 0.0, 0.0
39
40
41 min_h = h_mean - h_spread
42 max_h = h_mean + h_spread
43
44 plot "/dev/shm/DHT22-humidity" using ($1+7200):($2 > min_h && $2 < max_h ? $2 : '') with dots title "DHT22 % hum" \
45 ,"/dev/shm/rtl_433-humidity" using ($1+7200):($2) with dots title "RTL433 % hum" axis x1y2
46
47 unset multiplot