|
From: Thomas S. <t.s...@fz...> - 2011-10-03 10:29:13
|
without knowing how your data files look like, here's a simple
example:
datafile:
1 1 a
2 2 b
3 3 c
4 4 d
we want to use the "a" in the 1st line as a key title,
so we plot nothing to get the "a", store in "var1", and
then plot the data:
plot "datafile" using 1:(var1=stringcolumn(3), NaN) every ::0::0 notitle, \
"" using 1:2 with lines title var1
ftpronk wrote:
>
> Dear All,
>
> I would like to use a variable from a data file as title for a plot.
> Something like:
>
> var1 = './data_2' index 1000 using 4
> plot './data_1' index 1000 using 1:2 title var1
>
> Well, obviously, the example I just gave doesnt work. But I would like to
> know whether it is possible to do something similar in gnuplot? Maybe
> using a syntax similar to:
> plot [...] title sprintf("%d", myVar) ?
>
> Thank you for your help!
>
> Looking forward to your reply,
>
> Francois.
>
--
View this message in context: http://old.nabble.com/Use-variable-from-datafile-in-plot-tp32577747p32581554.html
Sent from the Gnuplot - User mailing list archive at Nabble.com.
|