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.

