generate single gnuplot image
authorDobrica Pavlinusic <dpavlin@rot13.org>
Sat, 1 Apr 2017 09:34:25 +0000 (11:34 +0200)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Sat, 1 Apr 2017 09:34:25 +0000 (11:34 +0200)
temp.gnuplot
temp.sh

index 50a476b..9540a21 100644 (file)
@@ -1,17 +1,21 @@
-set terminal png size 600,250
+set terminal pngcairo mono size 600,800
 
 set xdata time
 set timefmt "%s"
 
 set pointsize 0.2
 
-set output '/dev/shm/1.png'
+set output '/dev/shm/temp.png'
+
+set multiplot
+set size 1, 0.5
+
+set origin 0.0, 0.5
+
 plot "/dev/shm/temp.tsv" using 1:2 with points title "DS18B20 deg. C","/dev/shm/temp.tsv" using 1:($3 > 1 && $3 < 45 ? $3 : '') with dots title "DHT22 deg. C"
 
-set output '/dev/shm/2.png'
-plot "/dev/shm/temp.tsv" using 1:($3 > 1 && $3 < 45 ? $3 : '') with dots title "DHT22 deg. C"
+set origin 0.0, 0.0
 
-set output '/dev/shm/3.png'
 plot "/dev/shm/temp.tsv" using 1:($4 > 3 ? $4 : '') with dots title "DHT22 % hum"
 
-
+unset multiplot
diff --git a/temp.sh b/temp.sh
index 0f9030f..ccd7266 100755 (executable)
--- a/temp.sh
+++ b/temp.sh
@@ -6,10 +6,17 @@
 tail -4320 `ls -t /dev/shm/vaillant.* | head -1` | sed "s/  .*| */ /" > /dev/shm/temp.tsv
 cd /home/pi/vaillant-thermostat/
 gnuplot temp.gnuplot
+convert /dev/shm/temp.png -gravity center -extent 600x800 -colorspace Gray /tmp/m1.gray.png
+
+echo Location: http://192.168.3.2/m1.gray.png
+echo
+
+exit 0
+
 montage /dev/shm/[1-3].png -tile 1x3 -geometry +0+0 /tmp/m1.png
-#convert /tmp/m1.png -gravity center -extent 600x800 /tmp/m1.pgm
+convert /tmp/m1.png -gravity center -extent 600x800 /tmp/m1.pgm
 convert /tmp/m1.png -gravity center -extent 600x800 -colorspace Gray /tmp/m1.gray.png
-#display /tmp/m1.pgm
+display /tmp/m1.pgm
 
 echo Location: http://192.168.3.2/m1.gray.png
 echo