battery gnuplot graph for current and voltage
authorDobrica Pavlinušić <dpavlin@rot13.org>
Sun, 2 Jul 2023 12:44:39 +0000 (14:44 +0200)
committerDobrica Pavlinušić <dpavlin@rot13.org>
Sun, 2 Jul 2023 12:44:39 +0000 (14:44 +0200)
battery.gnuplot [new file with mode: 0755]

diff --git a/battery.gnuplot b/battery.gnuplot
new file mode 100755 (executable)
index 0000000..a473810
--- /dev/null
@@ -0,0 +1,16 @@
+#!/usr/bin/gnuplot
+
+set terminal xterm
+
+set timefmt "%Y-%m-%dT%H:%M:%S"
+set xdata time
+
+#set ylabel "current"
+set y2tics 10 nomirror
+#set ytics nomirror
+set y2tics autofreq tc lt 1
+
+plot '/home/user/.local/state/battery.log' \
+       using 1:($3/1000) axis x1y1 title "mA" with points ps 0.7, \
+       '/home/user/.local/state/battery.log' \
+       using 1:($4/1000000) axis x1y2 title "V" with lines