-
Notifications
You must be signed in to change notification settings - Fork 3
/
weekplotter.gpi
33 lines (27 loc) · 1.06 KB
/
weekplotter.gpi
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/usr/bin/gnuplot
reset
# Input file contains comma-separated values fields
set datafile separator ","
set terminal png size 640,360
set output "weektemps.png"
set xdata time
set timefmt "%Y-%m-%d %H:%M:%S"
set format x "%d.%m."
# set xrange [ time(0) - 86400 : time(0) ] # 86400 sec = 1 day
set xrange [ time(0) - 612000 : time(0) + 7200 ] # 604800 sec = 1 week
set xtics 86400 font "Ariel, 10"
set xlabel "Zeit"
set ylabel "Temperatur"
set yrange [-20:40]
set ytics 5 font "Ariel, 10"
set title "Temperatur innen/aussen Woche"
set key below
set grid
set style line 1 lt rgb "red" lw 3
set style line 2 lt rgb "green" lw 3
set style line 3 lt rgb "blue" lw 1
set style line 4 lt rgb "orange" lw 1
plot '< tail -n 10000 /home/pi/YAWP/weather.csv' using 1:2 ls 1 title "Innen" with lines, \
'< tail -n 10000 /home/pi/YAWP/weather.csv' using 1:3 ls 2 title "Aussen" with lines, \
'< tail -n 10000 /home/pi/YAWP/weather.csv' using 1:4 ls 3 title "Null" with lines, \
'< tail -n 10000 /home/pi/YAWP/weather.csv' using 1:5 ls 4 title "Fünfzehn" with lines