• Re: Looking for chart plotting program

    From Chris Green@3:633/10 to All on Friday, February 06, 2026 16:30:01
    Greg Wooledge <greg@wooledge.org> wrote:
    On Fri, Feb 06, 2026 at 09:33:07 +0000, Chris Green wrote:
    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.

    I know I'm repeating myself, but this whole thread has been going in
    circles for a couple days now, so once again: rrdtool does exactly
    what you want.

    I've had a hard look at rrdtool and, while it does some of what I
    want, it's not really what I'm looking for.


    First, you define a round robin database with whatever parameters are appropriate for your data. This is the hard part. You come up with
    a plan like "I will collect data every minute, and store that data
    for 30 days, and store averaged data for 360 days."

    I don't want to work like this. The 'round robin' part of it simply
    isn't what I'm after. I want ways of handling different length chunks
    of data I'm accumulating over days, weeks months, etc. So I may want
    to look at today's results and then look at a week in the middle of
    last year to compare.

    Then you set up a cron job to collect your data point every minute or whatever, and those go into your database.

    Whenever you like, then, you can tell rrdtool to generate a graph of the
    last hour, or the last day, or the last 30 days, or whatever you need.

    Looking at rdtool I don't really see how it works for all these
    different time periods. Maybe I'm misunderstanding it completely.

    I **want** a database that grows! :-) It's not as if the amount of
    data is going to get unmanageable.

    I have similar data acquired for other reasons that I find useful very
    often simply **because** it goes back over many years. I have one
    database with values from the last 15 years and it's only about 8Mb.


    --
    Chris Green
    ú

    --- PyGate Linux v1.5.11
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From David Wright@3:633/10 to All on Friday, February 06, 2026 17:10:01
    On Fri 06 Feb 2026 at 14:27:26 (+0000), Chris Green wrote:
    David wrote:
    On Fri, 6 Feb 2026 at 09:40, Chris Green wrote:
    Svetlana Tkachenko wrote:
    Arno Lehmann wrote:

    have a look at gnuplot.

    +1, gnuplot is easy to use for me. How does it work for you, Chris?

    The trouble with gnuplot (and many others) is that they are aimed at plotting functions rather than raw data.

    I've looked at the 2D examples at https://gnuplot.sourceforge.net/demo_6.0/ and none of them show a simple value (i.e. raw data) versus time plot which is what I'm after.

    I realise that it can be done in gnuplot (running_avg.dem is sort of some of the way there) but something aimed specifically at time plots, especially with the ability to squeeze the horizontal (time) ticks would be much closer to what I'm specifically looking for.

    Hi,

    Does this do what you want?

    $ cat values
    1 2
    3 3
    4 4
    5 3
    6.5 1.2

    $ gnuplot
    gnuplot> set style line 1 lc rgb '#0060ad' lt 1 lw 1 pt 7 pi -1 ps 1 gnuplot> set pointintervalbox 1.25
    gnuplot> plot "values" using 1:2 with lp ls 1

    If that does not do what you want, can you explain more clearly what you mean by "squeezing" the x-axis.

    No, it doesn't really address the issue, or at least I don't think it
    does, I may be misunderstanding though.

    I have more X values than will fit across the screen as discrete points.

    So, for a day's results, I have 1440 x values, going from 0 to 1339
    (minutes in a day). One of the sets of y values will simply be a
    battery voltage, probably in the range 10v to 15v. I want to have a
    plot which shows how the voltage varies over the 24 hours (1440
    minutes) of the day with, say, the hour of the day shown on the x-axis.

    I've not used gnuplot before. So I typed:

    $ for j in $(seq 2 .01 10); do printf '%s \n' "$j" >> yseq; done

    and, in an editor, copied it twice more to get 2400 lines, then

    $ for j in $(seq 1 1 2400); do printf '%s \n' "$j" >> xseq; done
    $ paste xseq yseq > values

    I then cut and pasted the exact gnuplot lines above, and a graph
    popped up on the screen, showing a nice sawtooth waveform of
    a "battery" being thrice "charged" and suddenly "discharging".
    Isn't that what you want?

    I have yet to read man gnuplot and find out what I have actually
    done. A cursory glance at it suggests that I'm going to have to find
    some doc file to decode all those two-letter abbreviations (I can
    guess rgb).

    Cheers,
    David.

    --- PyGate Linux v1.5.11
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Reginald Beardsley@3:633/10 to All on Friday, February 06, 2026 17:40:01
    gnuplot will do time-date annotation.ÿ It is limited only by the device resolution.ÿ If you plot points instead of lines you can get a better sense of the statistics.ÿ gnuplot will plot millions of samples.ÿ You can plot a surface of voltage vs time of week over months and then rotate the points in 3D.
    I think your best option if you have lots of data is to surface plot day:time:voltage with points
    The biggest problem with time annotation is readability of the axes.ÿ But you can slant them.
    Have Fun!Reg
    On Friday, February 6, 2026 at 10:00:49 AM CST, David Wright <deblis@lionunicorn.co.uk> wrote:

    On Fri 06 Feb 2026 at 14:27:26 (+0000), Chris Green wrote:
    David wrote:
    On Fri, 6 Feb 2026 at 09:40, Chris Green wrote:
    Svetlana Tkachenko wrote:
    Arno Lehmann wrote:

    have a look at gnuplot.

    +1, gnuplot is easy to use for me. How does it work for you, Chris?

    The trouble with gnuplot (and many others) is that they are aimed at plotting functions rather than raw data.

    I've looked at the 2D examples at https://gnuplot.sourceforge.net/demo_6.0/ and none of them show a simple value (i.e. raw data) versus time plot which is what I'm after.

    I realise that it can be done in gnuplot (running_avg.dem is sort of some of the way there) but something aimed specifically at time plots, especially with the ability to squeeze the horizontal (time) ticks would be much closer to what I'm specifically looking for.

    Hi,

    Does this do what you want?

    $ cat values
    1 2
    3 3
    4 4
    5 3
    6.5 1.2

    $ gnuplot
    gnuplot> set style line 1 lc rgb '#0060ad' lt 1 lw 1 pt 7 pi -1 ps 1 gnuplot> set pointintervalbox 1.25
    gnuplot> plot "values" using 1:2 with lp ls 1

    If that does not do what you want, can you explain more clearly what you mean by "squeezing" the x-axis.

    No, it doesn't really address the issue, or at least I don't think it
    does, I may be misunderstanding though.

    I have more X values than will fit across the screen as discrete points.

    So, for a day's results, I have 1440 x values, going from 0 to 1339
    (minutes in a day).ÿ One of the sets of y values will simply be a
    battery voltage, probably in the range 10v to 15v.ÿ I want to have a
    plot which shows how the voltage varies over the 24 hours (1440
    minutes) of the day with, say, the hour of the day shown on the x-axis.
    I've not used gnuplot before. So I typed:
    ÿ $ for j in $(seq 2 .01 10); do printf '%s \n' "$j" >> yseq; done
    and, in an editor, copied it twice more to get 2400 lines, then
    ÿ $ for j in $(seq 1 1 2400); do printf '%s \n' "$j" >> xseq; done
    ÿ $ paste xseq yseq > values
    I then cut and pasted the exact gnuplot lines above, and a graph
    popped up on the screen, showing a nice sawtooth waveform of
    a "battery" being thrice "charged" and suddenly "discharging".
    Isn't that what you want?
    I have yet to readÿ man gnuplotÿ and find out what I have actually
    done. A cursory glance at it suggests that I'm going to have to find
    some doc file to decode all those two-letter abbreviations (I can
    guess rgb).
    Cheers,
    David.



    --- PyGate Linux v1.5.11
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Andy Smith@3:633/10 to All on Friday, February 06, 2026 21:10:01
    Hi,

    On Fri, Feb 06, 2026 at 03:07:47PM +0000, Chris Green wrote:
    Looking at rdtool I don't really see how it works for all these
    different time periods. Maybe I'm misunderstanding it completely.

    I don't understand why you think rrdtool can't do this. You decide what granularity you want at the time you create the rrd.

    If you want to keep 5 minute samples for 10 years that is fine, just
    accept that the rrd will be sized for the ~1.05 million entries this
    would entail.

    If instead you tell it to keep 5 minute samples for 1 year and 30 minute averages for the 9 years prior to that, that will be ~105k samples for
    the previous year and ~157k 30 minute averages for the 9 years prior to
    that. And so on.

    When you tell it to make the graph rrdtool will choose the data set with
    the most accuracy for the timespan being shown.

    Thanks,
    Andy

    --
    https://bitfolk.com/ -- No-nonsense VPS hosting

    --- PyGate Linux v1.5.11
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From David@3:633/10 to All on Saturday, February 07, 2026 00:40:01
    On Fri, 6 Feb 2026 at 16:00, David Wright <deblis@lionunicorn.co.uk> wrote:
    On Fri 06 Feb 2026 at 14:27:26 (+0000), Chris Green wrote:
    David wrote:
    On Fri, 6 Feb 2026 at 09:40, Chris Green wrote:
    Svetlana Tkachenko wrote:
    Arno Lehmann wrote:

    have a look at gnuplot.

    +1, gnuplot is easy to use for me. How does it work for you,
    Chris?

    The trouble with gnuplot (and many others) is that they are aimed
    at plotting functions rather than raw data.

    I've looked at the 2D examples at https://gnuplot.sourceforge.net/demo_6.0/ and none of them show
    a simple value (i.e. raw data) versus time plot which is what I'm after.

    I realise that it can be done in gnuplot (running_avg.dem is sort
    of some of the way there) but something aimed specifically at time plots, especially with the ability to squeeze the horizontal (time) ticks would be much closer to what I'm specifically looking for.

    Does this do what you want?

    $ cat values
    1 2
    3 3
    4 4
    5 3
    6.5 1.2

    $ gnuplot
    gnuplot> set style line 1 lc rgb '#0060ad' lt 1 lw 1 pt 7 pi -1 ps 1 gnuplot> set pointintervalbox 1.25
    gnuplot> plot "values" using 1:2 with lp ls 1

    If that does not do what you want, can you explain more clearly what
    you mean by "squeezing" the x-axis.

    No, it doesn't really address the issue, or at least I don't think it
    does, I may be misunderstanding though.

    I have more X values than will fit across the screen as discrete points.

    So, for a day's results, I have 1440 x values, going from 0 to 1339 (minutes in a day). One of the sets of y values will simply be a
    battery voltage, probably in the range 10v to 15v. I want to have a
    plot which shows how the voltage varies over the 24 hours (1440
    minutes) of the day with, say, the hour of the day shown on the x-axis.

    I've not used gnuplot before.

    Me neither! :)

    So I typed:

    $ for j in $(seq 2 .01 10); do printf '%s \n' "$j" >> yseq; done

    and, in an editor, copied it twice more to get 2400 lines, then

    $ for j in $(seq 1 1 2400); do printf '%s \n' "$j" >> xseq; done
    $ paste xseq yseq > values

    I then cut and pasted the exact gnuplot lines above, and a graph
    popped up on the screen, showing a nice sawtooth waveform of
    a "battery" being thrice "charged" and suddenly "discharging".
    Isn't that what you want?

    I have yet to read man gnuplot and find out what I have actually
    done. A cursory glance at it suggests that I'm going to have to find
    some doc file to decode all those two-letter abbreviations (I can
    guess rgb).

    You and me both :)

    I found a similar question [1] on stackoverflow, where the solution seems
    to be using a gnuplot 'filter' [2], possibly a 'bins' filter [3].

    [1] https://stackoverflow.com/questions/22839796/reduce-datapoints-when-using-logscale-in-gnuplot
    [2] http://www.gnuplot.info/docs/loc8198.html
    [3] http://www.gnuplot.info/docs/loc8212.html

    --- PyGate Linux v1.5.11
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Anssi Saari@3:633/10 to All on Monday, February 09, 2026 13:00:01
    Chris Green <cl@isbd.net> writes:

    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.

    This can be web or desktop, all I want is a window with a line drawn
    across it really, a scale would be handy and the ability to show more
    than one plot (e.g. voltage and current maybe).

    I once used the plotly library (from https://dash.plotly.com/) to
    generate web pages with weather data, just temperature and RH from a
    cheapo weather station which sends these data once a minute. I assume
    this is a similar case to yours? It was a trial only, mostly because I
    never got around to setting up a web server where I could access those
    plots. One of these days, for sure...

    All I really did was adapt the show_weather_station.py script at https://github.com/AgriVision/rpi_rtlsdr_weather_station to query my
    database and generate my plots. Basically I just threw out most of the
    script and kept the parts that did the temp and RH plots. As I recall,
    it was surprisingly simple just to mangle that script, without knowing
    much anything about plotly. The script even includes a handy date range selector.

    There are some sample plots and explanation at https://www.agri-vision.nl/portal/projects/25-rtl-sdr-based-weather-station-on-raspberry-pi

    --- PyGate Linux v1.5.11
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Chris Green@3:633/10 to All on Monday, February 09, 2026 13:30:01
    Anssi Saari <anssi.saari@debian-user.mail.kapsi.fi> wrote:
    Chris Green <cl@isbd.net> writes:

    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.

    This can be web or desktop, all I want is a window with a line drawn
    across it really, a scale would be handy and the ability to show more
    than one plot (e.g. voltage and current maybe).

    I once used the plotly library (from https://dash.plotly.com/) to
    generate web pages with weather data, just temperature and RH from a
    cheapo weather station which sends these data once a minute. I assume
    this is a similar case to yours? It was a trial only, mostly because I
    never got around to setting up a web server where I could access those
    plots. One of these days, for sure...

    All I really did was adapt the show_weather_station.py script at https://github.com/AgriVision/rpi_rtlsdr_weather_station to query my
    database and generate my plots. Basically I just threw out most of the
    script and kept the parts that did the temp and RH plots. As I recall,
    it was surprisingly simple just to mangle that script, without knowing
    much anything about plotly. The script even includes a handy date range selector.

    There are some sample plots and explanation at https://www.agri-vision.nl/portal/projects/25-rtl-sdr-based-weather-station-on-raspberry-pi

    Thanks, that looks much like the sort of thing I'm trying to do.

    show_weather_station.py seems to be the fundamental bit that I want.

    ... and it's all there on:-

    https://github.com/AgriVision/rpi_rtlsdr_weather_station/blob/main/show_weather_station.py

    Thanks some more! :-)

    --
    Chris Green
    ú

    --- PyGate Linux v1.5.11
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Svetlana Tkachenko@3:633/10 to All on Tuesday, February 10, 2026 08:10:01
    Hi Chris

    especially with the ability to squeeze the horizontal (time) ticks
    would be much closer to what I'm specifically looking for.

    Could you please clarify? Maybe an example data and what expected to output. You could generate some fake data for an example if you like.

    Sveta

    --- PyGate Linux v1.5.11
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Anssi Saari@3:633/10 to All on Tuesday, February 10, 2026 11:40:01
    "Svetlana Tkachenko" <svetlana@members.fsf.org> writes:

    Hi Chris

    especially with the ability to squeeze the horizontal (time) ticks
    would be much closer to what I'm specifically looking for.

    Could you please clarify? Maybe an example data and what expected to output. You could generate some fake data for an example if you like.

    Sveta

    I thought it should be clear this is just scaling? Have a million
    datapoints and want to show that in a window of, say, 2000 pixels wide?
    Then again, apparently gnuplot autoscales all axes by default so it
    should be fine with that sort of thing.

    --- PyGate Linux v1.5.11
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)