On Fri 06 Feb 2026 at 23:30:14 (+0000), David wrote:
> On Fri, 6 Feb 2026 at 16:00, David Wright <[email protected]> wrote:
> > On Fri 06 Feb 2026 at 14:27:26 (+0000), Chris Green wrote:
[ … ]
> > > 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! :)

I thought I'd try something a bit more random. So I typed:

  $ for j in $(seq 10 0.0005 15); do printf '%s\t%s\n' "$RANDOM" "$j"; done | 
sort -n > values

> > I then cut and pasted the exact gnuplot lines above, and a graph
> > popped up on the screen, showing a

… mass of blue, with white circles outlining the dots
(your pointintervalbox, David, was a clever touch), showing …

> > a "battery"

… voltage affected by a bad connection. There were 10001 points
"squeezed" into the X-axis with no difficulty at all. I'd already
discovered that a right-click and left-click sequence would magnify
sections of the graph, so I could check that it was all plotted
correctly.

I have some old day-long files of temperature and battery charge
meansured every three seconds, but I haven't used them as test data
because I'd need to read up about using their HH:MM:SS timestamps
for the X-axis.

> > Isn't that what you want?

… when you have already collected your data.

> 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

Because the OP gave a linear example, I haven't bothered with any data
transformations at all. The HTML files in gnuplot-doc were well
organised, so I figured out what the two-letter abbreviations were
doing. One or two (like "with lp ls 1") look non-unique, so I need to
play with changing them, and I haven't yet come across a table for
changing from blue dots by setting a value other than that "1".

Sometime I'll take a look at rrdtool and try realtime plotting.

Cheers,
David.

Reply via email to