Page 1 of 1

Graphing data without gnumeric. How?

Posted: Sun Oct 13, 2024 6:06 am
by greengeek

I am running a "cutdown" puppy that does not have gnumeric installed (I can install it but choose not to at present...)

I am measuring data from a battery charging experiment and would like to visualise a "line" of time versus voltage. ie: I would like to visualise a graph of my data.

Has anyone scripted a simple way to create some form of terminal (or text file) graph of simple data?

This webpage does suggest options but I would prefer to achieve this with existing puppy tools:
https://www.baeldung.com/linux/cli-char ... ting-tools
(I particularly wish to avoid python if possible..)

Example of my data (Charging fully discharged 12volt LiFePo4 battery of capacity 10AH and charge current of 2A):
Time Voltage
16.47 0.15
16.48 11.3
16.49 11.6
16.51 12.05
16.52 12.1
16.56 12.5
17.02 12.86
17.08 13.1
17.15 13.12
17.20 13.13
17.35 13.22
17.45 13.29
17.55 13.33
18.15 13.42
18.22 13.44
18.57 13.45
..continues...

(I expect the voltage parameter to trend upwards to an eventual endpoint of 14.5 volts or so)

Possibly I should reformat the "time" in terms of "seconds".

Has anyone done something similar??

Cheers!

EDIT 1: One challenge is that my "x" data is not necessarily regular - ie I dont remember to make measurements every minute. The gap between "time" values will be irregular. So the script maybe has to "pad out" or "space out" the recorded values.

EDIT 2: There is a utility called "gnuplot" that seems interesting - though this has a minimum of 12MB of dependencies - but my gut feeling is that a simple x,y plot should be lighter and simpler than this. I know Bash arithmetic is not the best - but surely there is a way to do this in a lightweight way??


Re: Graphing data without gnumeric. How?

Posted: Sun Oct 13, 2024 7:48 am
by bbbhltz

I have had to make graphs and charts for work before and went in hunt of different tools. I ended up using Python (pygal) but tried Gnuplot and YouPlot (https://github.com/red-data-tools/YouPlot).

I did do some plotting by hand too.

I am interested in seeing if someone can suggest something lighter than 12 MB.


Re: Graphing data without gnumeric. How?

Posted: Sun Oct 13, 2024 9:15 am
by Keef

datadash might be ok: https://github.com/keithknott26/datadas ... me-ov-file
It has to be compiled with go but comes out as 4199K stripped.

Code: Select all

 ldd datadash
        linux-vdso.so.1 (0x00007fa2e56d2000)
        libresolv.so.2 => /lib64/libresolv.so.2 (0x00007fa2e56bb000)
        libc.so.6 => /lib64/libc.so.6 (0x00007fa2e54d9000)
        /lib64/ld-linux-x86-64.so.2 (0x00007fa2e56d4000)

Don't know how to use it, or if it will do what you want though.

I found it poking around in the first of these:
https://github.com/toolleeo/cli-apps/
https://github.com/agarrharr/awesome-cli-apps

Here is a link to a file you can download.
https://file.io/g95PQMCyPHA3
Contains the binary, docs, examples readme and licence.
Compiled it on Fatdog, not tried it on anything else. Use at own risk etc etc...


Re: Graphing data without gnumeric. How?

Posted: Sun Oct 13, 2024 9:28 am
by greengeek

Note to self:
In the morning try installing plotutils from PPM and use plot --help


Re: Graphing data without gnumeric. How?

Posted: Sun Oct 13, 2024 7:07 pm
by puppy_apprentice

If you have browser u can try those:
https://www.w3schools.com/js/js_graphics.asp


Re: Graphing data without gnumeric. How?

Posted: Mon Oct 14, 2024 12:14 am
by MochiMoppel
greengeek wrote: Sun Oct 13, 2024 6:06 am

Has anyone scripted a simple way to create some form of terminal (or text file) graph of simple data?
...
Has anyone done something similar??

Yes. I used bash for creating SVG scales and lines. All you need is a text editor, some application (doesn't have to be a browser) that can render SVG images - provided your "cutdown" Puppy supports SVG - and a bit of time to learn SVG basics, if you haven't done so already.

Possibly I should reformat the "time" in terms of "seconds".

Minutes, if you need that accuracy. Would require 1440 possible datapoint for a full 24h period. A resolution still within the range of a good monitor.