show only hour on x asix, fix timezone
authorDobrica Pavlinusic <dpavlin@rot13.org>
Mon, 26 Jun 2017 20:05:01 +0000 (22:05 +0200)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Mon, 26 Jun 2017 20:05:01 +0000 (22:05 +0200)
temp2.gnuplot

index 9a3ccea..0d4bf08 100644 (file)
@@ -3,6 +3,8 @@ set terminal pngcairo mono size 600,800
 set xdata time
 set timefmt "%s"
 
+set xtics format "%H"
+
 set pointsize 0.2
 
 set output '/dev/shm/temp2.png'
@@ -12,10 +14,10 @@ set size 1, 0.5
 
 set origin 0.0, 0.5
 
-plot "/dev/shm/DS18B20-temperature" using 1:2 with dots title "DS18B20 deg. C","/dev/shm/DHT22-temperature" using 1:($2 > 1 && $2 < 45 ? $2 : '') with dots title "DHT22 deg. C"
+plot "/dev/shm/DS18B20-temperature" using ($1+7200):($2 > 3 ? $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"
 
 set origin 0.0, 0.0
 
-plot "/dev/shm/DHT22-humidity" using 1:($2 > 3 ? $2 : '') with dots title "DHT22 % hum"
+plot "/dev/shm/DHT22-humidity" using ($1+7200):($2 > 3 ? $2 : '') with dots title "DHT22 % hum"
 
 unset multiplot