Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- db_prefix = "/srv/nfs4/"
- db(f) = db_prefix . f . ".sqlite3"
- set term svg enhanced size 1024,480 background rgb "white"
- set output "/opt/local/nginx/html/sensors/g1_temp.svg"
- set datafile separator ","
- set xdata time
- set timefmt "%Y-%m-%d %H:%M:%S"
- set title "THERMAL SENSORS"
- set bmargin 3
- set lmargin 10
- set rmargin 10
- set grid
- set mxtics 4
- set mytics 5
- set ylabel "TEMPERATURE"
- set y2label "HUMIDITY"
- set xtics format "%H:%M" font ",10" nomirror
- set ytics format "%g *C" font ",10" nomirror
- set y2tics format "%g %%" font ",10"
- #set yrange [10:30]
- #set y2range [10:90]
- set key left font "monospace,10" box opaque
- plot \
- "< sqlite3 -separator , " . db("DHT11") . " '.read " . system("echo $HOME") . "/src/sensors/dht11_all.sql'" \
- u 1:2 w lines title "DHT11 (Temperature)" \
- , "" u 1:3 w lines lc rgb sprintf("#%02x%02x%02x",128,192,255) title "DHT11 (Humidity)" axis x1y2 \
- , "< sqlite3 -separator , " . db("temp") . " '.read " . system("echo $HOME") . "/src/sensors/lm_all.sql'" \
- u 1:6 w lines dt "-" lc rgb sprintf("#%02x%02x%02x",128,128,128) title "Average within 24 hours (LM35DZ)" \
- , "" u 1:2 w lines lc rgb sprintf("#%02x%02x%02x",255, 64, 64) title "LM61CIZ" \
- , "" u 1:3 w lines lc rgb sprintf("#%02x%02x%02x",128, 64, 64) title "LM61BIZ" \
- , "" u 1:4 w lines lc rgb sprintf("#%02x%02x%02x", 64,255, 64) title "LM61CIZ \\& LM358N (x2)" \
- , "" 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