EnO_A5-30-01.gplot 889 B

123456789101112131415161718192021222324252627282930
  1. ##############################################
  2. # $Id: EnO_A5-30-01.gplot 9594 2015-10-22 19:56:42Z klaus-schauer $
  3. # Display contact sensor log
  4. # FileLog definition:
  5. # define FileLog_device FileLog ./log/device-%Y.log device
  6. #
  7. # Logfile record example:
  8. # 2015-10-17_08:38:08 device contact open|closed
  9. # 2015-10-17_08:38:08 device battery ok|low
  10. set terminal png transparent size <SIZE> crop
  11. set output '<OUT>.png'
  12. set title '<TL>'
  13. set xdata time
  14. set timefmt "%Y-%m-%d_%H:%M:%S"
  15. set xlabel " "
  16. set ylabel "Contact"
  17. set y2label "Battery"
  18. set ytics ("closed" 1, "open" 0.6)
  19. set y2tics ("ok" 0.4, "low" 0)
  20. set yrange [-0.1:1.1]
  21. set y2range [-0.1:1.1]
  22. set grid
  23. #FileLog 4:contact:0:$fld[3]=~"closed"?1:0.6
  24. #FileLog 4:battery:0:$fld[3]=~"ok"?0.4:0
  25. plot "<IN>" using 1:2 axes x1y1 title 'Contact' ls l0 lw 1 with steps,\
  26. "<IN>" using 1:2 axes x1y2 title 'Battery' ls l1 lw 1 with steps