Graphing data without gnumeric. How?

For discussions about programming, and for programming questions and advice


Moderator: Forum moderators

Post Reply
User avatar
greengeek
Posts: 1411
Joined: Thu Jul 16, 2020 11:06 pm
Has thanked: 548 times
Been thanked: 196 times

Graphing data without gnumeric. How?

Post 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??

User avatar
bbbhltz
Posts: 28
Joined: Sun Sep 29, 2024 8:04 am
Location: Europe
Has thanked: 9 times
Been thanked: 6 times
Contact:

Re: Graphing data without gnumeric. How?

Post 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.

bbbhltz
longtime desktop Linux user; eternal newbie
blog mastodon

User avatar
Keef
Posts: 278
Joined: Tue Dec 03, 2019 8:05 pm
Has thanked: 3 times
Been thanked: 75 times

Re: Graphing data without gnumeric. How?

Post 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...

Last edited by Keef on Sun Oct 13, 2024 9:32 am, edited 1 time in total.
User avatar
greengeek
Posts: 1411
Joined: Thu Jul 16, 2020 11:06 pm
Has thanked: 548 times
Been thanked: 196 times

Re: Graphing data without gnumeric. How?

Post by greengeek »

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

User avatar
puppy_apprentice
Posts: 692
Joined: Tue Oct 06, 2020 8:43 pm
Location: land of bigos and schabowy ;)
Has thanked: 5 times
Been thanked: 115 times

Re: Graphing data without gnumeric. How?

Post by puppy_apprentice »

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

User avatar
MochiMoppel
Posts: 1249
Joined: Mon Jun 15, 2020 6:25 am
Location: Japan
Has thanked: 22 times
Been thanked: 448 times

Re: Graphing data without gnumeric. How?

Post 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.

Post Reply

Return to “Programming”