This simple helper script draws all plots for a given logfile. The
.plot files are adjusted to not use a fixed file name, but instead
rely on the calling script to set the file into "datafile" variable.
Signed-off-by: Timo Kokkonen <timo.t.kokkonen@iki.fi>
set ylabel "Voltage (mV)"
-datafile = "logfile.log"
-
samples(x) = $0 > 4 ? 5 : ($0+1)
avg5(x) = (shift5(x), (back1 + back2 + back3 + back4 + back5) / samples($0))
shift5(x) = (back5 = back4, \
--- /dev/null
+#!/bin/sh
+
+gnuplot -e "datafile='$1'" voltage_and_current.plot > voltage.png
+gnuplot -e "datafile='$1'" balancing.plot > balancing.png
set datafile separator ";"
-datafile = "logfile.log"
-
set ylabel "Voltage (mV)"
set y2label "Current (mA)"
set y2tics border
-plot datafile using 7 axes x1y1, \
+plot datafile using 5 axes x1y1, \
datafile using 8 axes x1y1, \
datafile using 9 axes x1y1, \
datafile using 6 axes x1y2, \
datafile using 15 axes x1y2 \
+
+#plot datafile using 13