temp4rain10.gplot 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. ############################
  2. # Display the temperature and the humidity values of a KS300.
  3. # Corresponding FileLog definition:
  4. # define <filelogname> FileLog /var/log/fhem/hms-%Y.log <ks300name>:T:.*
  5. set terminal png transparent size <SIZE> crop
  6. set output '<OUT>.png'
  7. set xdata time
  8. set timefmt "%Y-%m-%d_%H:%M:%S"
  9. set xlabel " "
  10. set ytics nomirror
  11. set y2tics
  12. set title '<L1>'
  13. set grid
  14. set y2label "Temperature in C"
  15. set format y "%0.1f"
  16. set ylabel "Rain (l/m2)"
  17. set yrange [0:]
  18. # Computing Rain/h and Rain/d values by accumulating the changes.
  19. #FileLog 4:IR\x3a:0:
  20. #FileLog 10:IR\x3a:0:delta-h
  21. #FileLog 10:IR\x3a:0:delta-d
  22. plot "<IN>" using 1:4 axes x1y2 ls l0 title 'Temperature' with lines,\
  23. "<grep -v avg_ <IN> | perl -ane '\
  24. @a = split(\"[_:]\", $F[0]);\
  25. if(defined($lh) && $lh ne $a[1])\
  26. { printf(\"${ld}_$lh:30:00 %f\n\", $hv); $hv = 0; }\
  27. if($lv) { $hv += ($F[9]-$lv); }\
  28. $lh = $a[1]; $ld = $a[0]; $lv = $F[9];\
  29. END { printf(\"${ld}_$lh:30:00 %f\n\", $hv) }'"\
  30. using 1:2 axes x1y1 ls l1fill title 'Rain/h' with histeps,\
  31. "<grep -v avg_ <IN> | perl -ane '\
  32. @a = split(\"[_]\", $F[0]);\
  33. if(defined($ld) && $ld ne $a[0]) {\
  34. printf(\"${ld}_12:00:00 %f\n\", $dv); $dv = 0; }\
  35. if($lv) { $dv += ($F[9]-$lv); }\
  36. $ld = $a[0]; $lv = $F[9];\
  37. END {printf(\"${ld}_12:00:00 %f\n\", $dv)}'"\
  38. using 1:2 axes x1y1 ls l2 title 'Rain/day' with histeps