-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMB_ks300_wr.gplot
44 lines (39 loc) · 1.3 KB
/
MB_ks300_wr.gplot
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
34
35
36
37
38
39
40
41
42
43
44
#
# 2012-02-18 Michael Bussmann <support@mb-net.net>
#
# Display the Wind and the Rain values of a KS300.
#
set terminal png transparent size <SIZE> crop
set output '<OUT>.png'
set xdata time
set timefmt "%Y-%m-%d_%H:%M:%S"
set xlabel " "
set ytics nomirror
set y2tics
set title '<L1>'
set grid
set ylabel "Wind [km/h]"
set y2label "Regen [l/m2]"
set y2range [0:]
set format y2 "%0.1f"
#FileLog 8:IR:0:
#FileLog 10:IR:0:delta-h
#FileLog 10:IR:0:delta-d
# Computing Rain/h and Rain/d values by accumulating the changes.
plot "<IN>" using 1:8 axes x1y1 title 'Wind' with lines,\
"<grep -v avg_ <IN> | perl -ane '\
@a = split(\"[_:]\", $F[0]);\
if(defined($lh) && $lh ne $a[1])\
{ printf(\"${ld}_$lh:30:00 %f\n\", $hv); $hv = 0; }\
if($lv) { $hv += ($F[9]-$lv); }\
$lh = $a[1]; $ld = $a[0]; $lv = $F[9];\
END { printf(\"${ld}_$lh:30:00 %f\n\", $hv) }'"\
using 1:2 axes x1y2 title 'Regen/h' with histeps,\
"<grep -v avg_ <IN> | perl -ane '\
@a = split(\"[_]\", $F[0]);\
if(defined($ld) && $ld ne $a[0]) {\
printf(\"${ld}_12:00:00 %f\n\", $dv); $dv = 0; }\
if($lv) { $dv += ($F[9]-$lv); }\
$ld = $a[0]; $lv = $F[9];\
END {printf(\"${ld}_12:00:00 %f\n\", $dv)}'"\
using 1:2 axes x1y2 title 'Regen/d' with histeps