wind4windDir4.gplot 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #
  2. # Display the measured wind direction and wind speed of Oregon sensors
  3. #
  4. # FileLog definition:
  5. # define <filelogname> FileLog /var/log/fhem/<devname>-%Y.log <devname>
  6. # Filelog example:
  7. # define FileLog_WTGR800_A_cf FileLog /var/log/fhem/WTGR800_A_cf-%Y.log WTGR800_A_cf
  8. #
  9. #
  10. # Logfile record example:
  11. # 2010-08-10_17:57:14 WTGR800_A_cf wind_speed: 3.2
  12. # 2010-08-10_17:57:14 WTGR800_A_cf wind_dir: 270
  13. # Attribute 'small' is useful for gnuplot/-scroll only,
  14. # if plotsize is less than 800,400
  15. #set terminal png transparent small size <SIZE> crop
  16. set terminal png transparent size <SIZE> crop
  17. set output '<OUT>.png'
  18. set xdata time
  19. set timefmt "%Y-%m-%d_%H:%M:%S"
  20. set xlabel " "
  21. set ytics nomirror
  22. set y2tics
  23. #set ytics
  24. set title '<L1>'
  25. set grid xtics y2tics
  26. set y2label "Windspeed m/s"
  27. set ylabel "Wind Dir"
  28. #FileLog 4:wind_speed:0:
  29. #FileLog 4:wind_dir:0:
  30. plot \
  31. "< awk $3=="wind_speed:" {print $1, $4}' <IN>"\
  32. using 1:2 axes x1y2 title 'Wind Speed' with lines,\
  33. "< awk $3=="wind_dir:" {print $1, $4}' <IN>"\
  34. using 1:2 axes x1y1 title 'Wind Direction' with points\