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.
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."
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.
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.
David wrote:I've not used gnuplot before. So I typed:
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.
Looking at rdtool I don't really see how it works for all these
different time periods. Maybe I'm misunderstanding it completely.
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.
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).
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).
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
especially with the ability to squeeze the horizontal (time) ticks
would be much closer to what I'm specifically looking for.
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
| Sysop: | Jacob Catayoc |
|---|---|
| Location: | Pasay City, Metro Manila, Philippines |
| Users: | 5 |
| Nodes: | 4 (0 / 4) |
| Uptime: | 117:51:00 |
| Calls: | 125 |
| Calls today: | 125 |
| Files: | 489 |
| D/L today: |
859 files (365M bytes) |
| Messages: | 76,472 |
| Posted today: | 26 |