RainEagle library plus script for polling data
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.
 
 

45 lines
775 B

  1. # generate data to plot
  2. # plot_power.py > powerdata.dat
  3. #
  4. # Use gnuplot to plot data
  5. # gnuplot -e "plot_data_file='powerdata'" gnup_poweruse.txt
  6. #
  7. # Output will be in file powerdata.png
  8. #
  9. name=plot_data_file
  10. set output name.".png"
  11. set terminal png size 2600,500
  12. #set terminal png size 1920,500
  13. #set terminal png size 800,150
  14. set datafile separator "\t"
  15. set xlabel "time"
  16. set ylabel "power"
  17. set grid
  18. #show mxtics
  19. #set mxtics 10
  20. set key off
  21. set pointsize 0.5
  22. set xtics rotate
  23. set xtics 3600
  24. set xdata time
  25. set timefmt "%Y-%m-%d %H:%M:%S"
  26. set format x "%a %b %d %H:%M"
  27. # set xrange [ "2014-03-04 00:00:00" : ]
  28. set style data lines
  29. set autoscale y
  30. set title "Power Use"
  31. plot name.".dat" using 1:3 t "inbound" w lines, name.".dat" using 1:5 t "outbound"