X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=temp2.gnuplot;h=764ad1726427c1f00f6507b4ffac1f046697e515;hb=577312aac6cb7b0300fa9d68442672b83b2a36f5;hp=cbee3b796257ac6c2f2cb03efac7689bd2ee6f7b;hpb=ddcbaccf7f18d26868d91dd3a24f613a034bf372;p=vaillant-thermostat diff --git a/temp2.gnuplot b/temp2.gnuplot index cbee3b7..764ad17 100644 --- a/temp2.gnuplot +++ b/temp2.gnuplot @@ -1,4 +1,8 @@ -set terminal pngcairo mono size 600,800 +if ( ! exists("mono") ) { + set terminal pngcairo color size 600,800 +} else { + set terminal pngcairo mono size 600,800 +} set xdata time set timefmt "%s" @@ -9,15 +13,41 @@ set pointsize 0.2 set output '/dev/shm/temp2.png' +unset border + set multiplot set size 1, 0.5 set origin 0.0, 0.5 -plot "/dev/shm/DS18B20-temperature" using ($1+7200):($2 > 3 && $2 < 45 ? $2 : '') with dots title "DS18B20 deg. C","/dev/shm/DHT22-temperature" using ($1+7200):($2 > 3 && $2 < 45 ? $2 : '') with dots title "DHT22 deg. C" +if ( ! exists("t_mean")) { + +t_mean=25 +t_spread=25 + +h_mean = 50 +h_spread = 30 + +print "using default mean and spread" +} + +min_t = t_mean - t_spread +max_t = t_mean + t_spread + +set ytics nomirror +set y2tics + +plot "/dev/shm/DS18B20-temperature" using ($1+7200):($2 > min_t && $2 < max_t ? $2 : '') with dots title "DS18B20 deg. C" \ +,"/dev/shm/DHT22-temperature" using ($1+7200):($2 > min_t && $2 < max_t ? $2 : '') with dots title "DHT22 deg. C" \ +,"/dev/shm/rtl_433-temperature" using ($1+7200):($2) with dots title "RTL433 deg. C" set origin 0.0, 0.0 -plot "/dev/shm/DHT22-humidity" using ($1+7200):($2 > 3 ? $2 : '') with dots title "DHT22 % hum" + +min_h = h_mean - h_spread +max_h = h_mean + h_spread + +plot "/dev/shm/DHT22-humidity" using ($1+7200):($2 > min_h && $2 < max_h ? $2 : '') with dots title "DHT22 % hum" \ +,"/dev/shm/rtl_433-humidity" using ($1+7200):($2) with dots title "RTL433 % hum" unset multiplot