Gnuplot hinzugefügt
This commit is contained in:
parent
27701eed07
commit
7e0edb6906
5 changed files with 50 additions and 18 deletions
|
@ -1,18 +0,0 @@
|
|||
# x-Achse enthält Zeitinformation
|
||||
set xdata time
|
||||
# Zeitformat zur Eingabe
|
||||
set timefmt x "%H:%M:%S"
|
||||
# Zeitformat zur Beschriftung der x-Achse
|
||||
set format x "%H:%M:%S"
|
||||
# set nokey #keine Legende
|
||||
set grid #Gitter anzeigen
|
||||
# set title "LOAD-Wert" #eventuell Überschrift
|
||||
set ylabel 'Temperatur'
|
||||
set xlabel 'Zeit'
|
||||
set y2tics # Zahlen auch auf 2. y-Achse
|
||||
|
||||
plot "daten_gnuplot.txt" using 1:2 title 'LOAD' with lines axes x1y1, \
|
||||
"daten_gnuplot.txt" using 1:3 title 'Rand' with lines axes x1y2
|
||||
set terminal svg size 1200,800
|
||||
set output "gnuplot.svg"
|
||||
replot
|
26
Einstellungen.plt
Normal file
26
Einstellungen.plt
Normal file
|
@ -0,0 +1,26 @@
|
|||
# x-Achse enthält Zeitinformation
|
||||
set xdata time
|
||||
# Zeitformat zur Eingabe
|
||||
set timefmt x "%Y/%m/%d\ %H:%M:%S"
|
||||
# Zeitformat zur Beschriftung der x-Achse
|
||||
set format x "%d.%m %H:%M"
|
||||
# set nokey #keine Legende
|
||||
set grid #Gitter anzeigen
|
||||
set title "Raspberry Pi" #Überschrift
|
||||
set ylabel 'Temperatur (°C)'
|
||||
set ylabel 'relative Luftfeuchtigkeit (%)'
|
||||
#set xlabel 'Zeit'
|
||||
set y2tics # Zahlen auch auf 2. y-Achse
|
||||
|
||||
plot "/var/www/gnuplot/daten_gnuplot.txt" using 1:3 title 'Innentemperatur 1' with lines axes x1y1, \
|
||||
"/var/www/gnuplot/daten_gnuplot.txt" using 1:4 title 'Innentemperatur 2' with lines axes x1y1, \
|
||||
"/var/www/gnuplot/daten_gnuplot.txt" using 1:5 title 'Außentemperatur' with lines axes x1y1, \
|
||||
"/var/www/gnuplot/daten_gnuplot.txt" using 1:6 title 'Temperatur Luft' with lines axes x1y1, \
|
||||
"/var/www/gnuplot/daten_gnuplot.txt" using 1:7 title 'Luftfeuchtigkeit' with lines axes x1y2, \
|
||||
"/var/www/gnuplot/daten_gnuplot.txt" using 1:8 title 'Prozessor' with lines axes x1y1
|
||||
set terminal svg size 1200,800
|
||||
set output "/var/www/gnuplot/gnuplot.svg"
|
||||
replot
|
||||
set terminal png size 1200,800
|
||||
set output "/var/www/gnuplot/gnuplot.png"
|
||||
replot
|
19
Webinterface/gnuplot.html
Normal file
19
Webinterface/gnuplot.html
Normal file
|
@ -0,0 +1,19 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="de">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>Gnuplot</title>
|
||||
<style>
|
||||
p {
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<p><a href="./gnuplot.php">Aktualisieren</a><p>
|
||||
<p><img src="./gnuplot/gnuplot.png" alt="Diagram als PNG" /></p>
|
||||
<p><img src="./gnuplot/gnuplot.svg" alt="Diagram als SVG" /></p>
|
||||
</body>
|
||||
</html>
|
5
Webinterface/gnuplot.php
Normal file
5
Webinterface/gnuplot.php
Normal file
|
@ -0,0 +1,5 @@
|
|||
<?php
|
||||
exec("sed 's/,/ /g' /home/pi/Temperaturmessung/dygraph.csv >/var/www/gnuplot/daten_gnuplot.txt");
|
||||
exec("gnuplot /home/pi/Temperaturmessung/Einstellungen.plt");
|
||||
header("Location: http://10.0.0.22/gnuplot.html");
|
||||
?>
|
0
diverses/rand.sh
Normal file → Executable file
0
diverses/rand.sh
Normal file → Executable file
Reference in a new issue