On 2026-02-06 09:33, Chris Green wrote:
Roland Müller <[email protected]> wrote:
Hello,
On 2/4/26 11:06, Chris Green wrote:
> I'm looking for a program to do simple chart plotting, e.g. I have
> some voltage measurements taken (say) once a minute and I want to
> display how the voltage varies over (say) a day.  So that's 1440
> measurements.

There is gnuplot as already mentioned but there are other tools too.


Pandas: this supports many other data analysis functionality

https://pandas.pydata.org/docs/reference/plotting.html

https://blog.jetbrains.com/pycharm/2023/02/using-pycharm-to-read-data-from-a-mysql-database-into-pandas/



Grafana; a data visualization tool with a lot of feature both for
plotting/visualization and using data sources

https://grafana.com/docs/grafana/latest/datasources/

Hmm, I took a look at that, it's **huge** and **complex**.  All I want
to do is plot values against time, grafana is massive overkill for
doing that.
Sorry I sent this to you instead of the list earlier.

I'd have thought if you have a CSV file values per line you could get that into an array with Perl
Text::CSV and make a visual representation putting dots on a TK canvas.
even easier would be to get the CSV file into an array and then use 
Imlib2 to draw points and save as a png.
perl
use Image::Imlib2;

# get CSV into @my_array here

my $width  = 1440;
my $height = 600;

# make a background
    my $im = Image::Imlib2->new($width, $height);
    $im->set_color(255,255,255,255);  # white background
    $im->fill_rectangle(0,0,$width,$height);
# this will have 0,0 in the top left corner
 $im->set_color(0,255,0,255);
    for my $x (0..$#my_array) {
        my $y = $my_array[$x];
$im->draw_point($x, $y);
    }
 $im->save("out.png");

Reply via email to