Monitoring du Phytotron
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

plot.sh 645B

12345678910111213141516171819202122232425262728293031323334353637
  1. #!/bin/bash
  2. # THIS IS A KLUDGE
  3. nbsamp=3000 # nombre d'echantillon
  4. if [ $# -eq 1 ]; then
  5. nbsamp=$1
  6. fi
  7. DATAFILE="serial/foo.dat"
  8. IMAGE="graphe.png"
  9. TMPFILE="/dev/shm/tmpdata"
  10. echo $nbsamp
  11. wc -l ${DATAFILE}
  12. tail -${nbsamp} < ${DATAFILE} > ${TMPFILE}
  13. gnuplot << __EOC__
  14. set term png size 1600,800
  15. set output "${IMAGE}"
  16. set ytics 2
  17. set xtics
  18. set grid front
  19. set title "* Temperatures du Phytotron *"
  20. set xdata time
  21. set timefmt "%s"
  22. set format x "%b %d\n%H:%M"
  23. set yrange [ 0.0 : 40.0 ]
  24. plot "${TMPFILE}" using 1:3 title " inside" with lines, \
  25. "${TMPFILE}" using 1:4 title "ambient" with lines
  26. __EOC__
  27. display ${IMAGE} &