mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-04 22:19:38 +00:00
Small fixes / avg_month gnuplot
git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@220 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
8640a15e6f
commit
bdf77c3db1
@ -294,7 +294,7 @@ SVG_render($$$$$$$)
|
|||||||
pO "<polyline points=\"$ret\" class=\"l$idx\"/>\n";
|
pO "<polyline points=\"$ret\" class=\"l$idx\"/>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
} elsif($type[$idx] eq "steps" ) {
|
} elsif($type[$idx] eq "steps" || $type[$idx] eq "fsteps" ) {
|
||||||
|
|
||||||
if(@{$dxp} == 1) {
|
if(@{$dxp} == 1) {
|
||||||
my $y1 = $y+$h-($dyp->[0]-$min)*$hmul;
|
my $y1 = $y+$h-($dyp->[0]-$min)*$hmul;
|
||||||
@ -306,7 +306,11 @@ SVG_render($$$$$$$)
|
|||||||
my ($x2, $y2) = ($x+$dxp->[$i], $y+$h-($dyp->[$i] -$min)*$hmul);
|
my ($x2, $y2) = ($x+$dxp->[$i], $y+$h-($dyp->[$i] -$min)*$hmul);
|
||||||
next if(int($x2) == $lx && int($y1) == $ly);
|
next if(int($x2) == $lx && int($y1) == $ly);
|
||||||
$lx = int($x2); $ly = int($y2);
|
$lx = int($x2); $ly = int($y2);
|
||||||
|
if($type[$idx] eq "steps") {
|
||||||
$ret .= sprintf(" %d,%d %d,%d %d,%d", $x1,$y1, $x2,$y1, $x2,$y2);
|
$ret .= sprintf(" %d,%d %d,%d %d,%d", $x1,$y1, $x2,$y1, $x2,$y2);
|
||||||
|
} else {
|
||||||
|
$ret .= sprintf(" %d,%d %d,%d %d,%d", $x1,$y1, $x1,$y2, $x2,$y2);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
pO "<polyline points=\"$ret\" class=\"l$idx\"/>\n";
|
pO "<polyline points=\"$ret\" class=\"l$idx\"/>\n";
|
||||||
|
@ -2,6 +2,8 @@
|
|||||||
# Display the temperature and the humidity values of a KS300.
|
# Display the temperature and the humidity values of a KS300.
|
||||||
# Corresponding FileLog definition:
|
# Corresponding FileLog definition:
|
||||||
# define ks300log FileLog /var/log/fhem/ks300-%Y-%U.log ks300:.*H:.*
|
# define ks300log FileLog /var/log/fhem/ks300-%Y-%U.log ks300:.*H:.*
|
||||||
|
# or (SVG/gnuplot-scroll)
|
||||||
|
# define ks300log FileLog /var/log/fhem/ks300-%Y.log ks300:.*H:.*
|
||||||
|
|
||||||
set terminal png transparent size <SIZE> crop
|
set terminal png transparent size <SIZE> crop
|
||||||
set output '<OUT>.png'
|
set output '<OUT>.png'
|
||||||
|
@ -2,6 +2,8 @@
|
|||||||
# Display the Wind and the Rain values of a KS300.
|
# Display the Wind and the Rain values of a KS300.
|
||||||
# Corresponding FileLog definition:
|
# Corresponding FileLog definition:
|
||||||
# define ks300log FileLog /var/log/fhem/ks300-%Y-%U.log ks300:.*H:.*
|
# define ks300log FileLog /var/log/fhem/ks300-%Y-%U.log ks300:.*H:.*
|
||||||
|
# or (SVG/gnuplot-scroll)
|
||||||
|
# define ks300log FileLog /var/log/fhem/ks300-%Y.log ks300:.*H:.*
|
||||||
|
|
||||||
set terminal png transparent size <SIZE> crop
|
set terminal png transparent size <SIZE> crop
|
||||||
set output '<OUT>.png'
|
set output '<OUT>.png'
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
############################
|
############################
|
||||||
# Display the Temperature and the humidity values of a KS300.
|
# Display the daily avarage temperature and rainfall from a KS300.
|
||||||
# Corresponding FileLog definition:
|
# Corresponding FileLog definition:
|
||||||
# define ks300log FileLog /var/log/fhem/ks300-%Y-%U.log ks300:.*H:.*
|
# define avglog FileLog /var/log/fhem/ks300-%Y.log ks300:.*avg.*
|
||||||
|
|
||||||
set terminal png transparent size <SIZE> crop
|
set terminal png transparent size <SIZE> crop
|
||||||
set output '<OUT>.png'
|
set output '<OUT>.png'
|
||||||
|
23
webfrontend/pgm2/ks300_4.gplot
Normal file
23
webfrontend/pgm2/ks300_4.gplot
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
############################
|
||||||
|
# Display the monthly avarage temperature and rainfall from a KS300.
|
||||||
|
# Corresponding FileLog definition:
|
||||||
|
# define avglog FileLog /var/log/fhem/ks300-%Y.log ks300:.*avg.*
|
||||||
|
|
||||||
|
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 '<TL>'
|
||||||
|
set grid
|
||||||
|
|
||||||
|
set ylabel "Temperature in C"
|
||||||
|
set y2label "Rain (l/m2)"
|
||||||
|
|
||||||
|
#FileLog 5:avg_month:0:
|
||||||
|
#FileLog 11:avg_month:0:
|
||||||
|
|
||||||
|
plot "<grep avg_month <IN>" using 1:5 axes x1y1 title 'Temperature' with lines,\
|
||||||
|
"<grep avg_month <IN>" using 1:11 axes x1y2 title 'Rain' with fsteps
|
Loading…
x
Reference in New Issue
Block a user