On Mittwoch, 19. Januar 2005 18:52, Hans-Bernhard Broeker wrote:
> Peter Bossy wrote:
> > I'm not sure if there is a solution for this problem:
> > I want to read a single value from another datafile than the
> > plotted file, and store the value in a variable for calculations
> > while plotting.
> No way from inside gnuplot, I suspect (well, except maybe some
> seriously ugly hack involving a 'fit' of that data file...). The
> usual way would be to assume piping capabilities, and let external
> tools do the job, i.e.:
> myvar = `program_to_extract_value_from -option filename`
> Note that those are back-quotes ``, not ordinary '' ones.
Thanks, that works. Also with piping:
myvar = `head -n 1 filename | cut -f 4`
Have a nice weekend