Advertisement
Guest User

Untitled

a guest
Feb 24th, 2017
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.54 KB | None | 0 0
  1. db_prefix = "/srv/nfs4/"
  2. db(f) = db_prefix . f . ".sqlite3"
  3.  
  4. set term svg enhanced size 1024,480 background rgb "white"
  5. set output "/opt/local/nginx/html/sensors/g1_temp.svg"
  6. set datafile separator ","
  7. set xdata time
  8. set timefmt "%Y-%m-%d %H:%M:%S"
  9.  
  10. set title "THERMAL SENSORS"
  11. set bmargin 3
  12. set lmargin 10
  13. set rmargin 10
  14. set grid
  15. set mxtics 4
  16. set mytics 5
  17. set ylabel "TEMPERATURE"
  18. set y2label "HUMIDITY"
  19. set xtics format "%H:%M" font ",10" nomirror
  20. set ytics format "%g *C" font ",10" nomirror
  21. set y2tics format "%g %%" font ",10"
  22. #set yrange [10:30]
  23. #set y2range [10:90]
  24. set key left font "monospace,10" box opaque
  25. plot \
  26. "< sqlite3 -separator , " . db("DHT11") . " '.read " . system("echo $HOME") . "/src/sensors/dht11_all.sql'" \
  27. u 1:2 w lines title "DHT11 (Temperature)" \
  28. , "" u 1:3 w lines lc rgb sprintf("#%02x%02x%02x",128,192,255) title "DHT11 (Humidity)" axis x1y2 \
  29. , "< sqlite3 -separator , " . db("temp") . " '.read " . system("echo $HOME") . "/src/sensors/lm_all.sql'" \
  30. u 1:6 w lines dt "-" lc rgb sprintf("#%02x%02x%02x",128,128,128) title "Average within 24 hours (LM35DZ)" \
  31. , "" u 1:2 w lines lc rgb sprintf("#%02x%02x%02x",255, 64, 64) title "LM61CIZ" \
  32. , "" u 1:3 w lines lc rgb sprintf("#%02x%02x%02x",128, 64, 64) title "LM61BIZ" \
  33. , "" u 1:4 w lines lc rgb sprintf("#%02x%02x%02x", 64,255, 64) title "LM61CIZ \\& LM358N (x2)" \
  34. , "" u 1:5 w lines lc rgb sprintf("#%02x%02x%02x", 64,128, 64) title "LM35DZ \\& LM358N (x3)"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement