|
From: <br...@ph...> - 2006-08-07 19:37:00
|
fusselpelusa wrote:
> Hi,
> I have a problem with labelling my plots at an arbitrary position (set label
> "... %f" '???filename and column/line???' at ....) using values from a file.
That's not surprising --- you can't do that. Gnuplot reads data from
outside files only in the {re|s|}plot commands. If you want to extract
a single piece of data from a file, you have to do that outside gnuplot,
and feed the result back into it as a command. The version-4.0 trick of
'set label "foo = %f", foo' works only for gnuplot-internal, numeric
variables, not for arbitrary data from external files.
If you want to extract lots of data from a file, wait for the 4.2
release and then use 'plot "file" with labels'
> Anyway, as the value I would like to be as label is not the only
> one in the line of my data file, perhaps awk will not work?
It will. You're badly underestimating awk. someone once wrote an
entire multi-targeting macro assembler in awk.
> Additionally I would like to implement underneith the plot a few lines of
> text from another textfile like a caption, is this possible with gnuplot?
Possible, sure (generate a multi-line 'set ylabel' or several 'set
label' commands from it), but rarely advisable. If you want a caption,
do it outside gnuplot, in the document processing system you're putting
that plot in.
|