rain4press4.gplot 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #
  2. # Display the measured temp and the pressure of Oregon sensors.
  3. #
  4. # FileLog definition:
  5. # define <filelogname> FileLog /var/log/fhem/<devname>-%Y.log <devname>
  6. # Filelog example:
  7. # define FileLog_BTHR918N_2d FileLog /var/log/fhem/BTHR918N_2d-%Y.log BTHR918N_2d
  8. #
  9. # Logfile record example:
  10. # 2010-08-10_18:00:22 BTHR918N_2d temperature: 21.7
  11. # 2010-08-10_18:00:22 BTHR918N_2d pressure: 1007
  12. # Attribute 'small' is useful for gnuplot/-scroll only,
  13. # if plotsize is less than 800,400
  14. #set terminal png transparent small size <SIZE> crop
  15. set terminal png transparent size <SIZE> crop
  16. set output '<OUT>.png'
  17. set xdata time
  18. set timefmt "%Y-%m-%d_%H:%M:%S"
  19. set xlabel " "
  20. set ytics nomirror
  21. set y2tics
  22. #set ytics
  23. set title '<L1>'
  24. set grid xtics y2tics
  25. set y2label "Temperature in C"
  26. set ylabel "Pressure in hPa"
  27. #FileLog 4:temperature:0:
  28. #FileLog 4:pressure:0:
  29. plot \
  30. "< awk $3=="temperature:" {print $1, $4}' <IN>"\
  31. using 1:2 axes x1y2 title 'Measured temperature' with lines,\
  32. "< awk $3=="pressure:" {print $1, $4}' <IN>"\
  33. using 1:2 axes x1y1 title 'Pressure hPa' with lines