|
From: BBands <bb...@gm...> - 2014-10-08 21:39:55
|
Hi Dave, I don't think that you are even close to pushing gnuplot's limits. Have a look here: http://www.gnuplotting.org/ Then, as a practical matter, try reading this: http://gnuplot.sourceforge.net/docs_4.2/node69.html Best, John On Wed, Oct 8, 2014 at 1:57 PM, Dave Horsfall <da...@ho...> wrote: > Continuing in my quest to push Gnuplot to its limits, I'd like to be able > to set the title of a graph to the dates of the first and last data. I'm > envisaging something like: > > set title "Plot of Blah\nFrom $first to $last\n(Use at own risk)" > > etc, where $first and $last are set from the first and last data lines. > I know that I can get this by reading the x-axis itself, but it's a bit > cleaner if it's part of the multi-line title. > > Not knowing the innards of Gnuplot, I'm hoping that the title can be > printed dynamically in the first place, so a Small Matter Of > Programming(tm) should extract what I want, if possible. > > Something like: > > Grab first date => $first. > Keep reading until EOF. > Grab last date => $last. > sprintf("Plot of Blah\nFrom %s to %s", $first, $last) into title. > Plot. > > (My next question will be whether it's possible to print the names of the > script and data files, when I print the graph date; I'm a data-driven sort > of guy.) |