plot nothing (0/0 = undefined) to store the value into a variable,
then use this variable for the title of the 2nd plot:
plot 'testbep.dat' using 1:(t=$2,0/0), \
'' using 1:2 with points pt 7 ps 1.7 title sprintf("BEP %01.2f",t)
the end_of_data "e" is only needed for inline data not
for data read from a file.
sergejzr wrote:
>
> Hello Dear Gnuplot wizards!
>
> I am quite new to this topic, but I am starting to like this software. I
> have some graph in mind and need your help to vizualize it! My problem:
>
> I would like to put a single point on the plot and to give it a special
> title, so right no it works like:
>
> plot 'testbep.dat' with points pt 7 ps 1.7 title sprintf("BEP
> %01.2f",0.63)
>
> data file 'testbep.dat':
> 0.6285488958990536 0.6285488958990536
>
> What I need is to take the number 0.63 directly from the data file, means
> take the 0.6285488958990536, round it to 0.63 and put into title.
>
> Any ideas, how to do it?
>
> And maybe you can help me to solve the second problem.
>
> What I actually would prefer, is to place both, the curve data and the
> point data into one file.
>
> This works:
> ######################
> set xlabel "Recall"
> set ylabel "Precision"
> set xrange[0.0:1.0]
> set yrange[0.0:1.0]
> set key inside left bottom
> plot "-" with linespoints notitle, "-" with points pt 7 ps 1.7 title "BEP
> 0.63"
> ########Data Part###########
> 0.10 0.8313492063492064
> 0.20 0.7976071784646062
> 0.30 0.7915549597855228
> 0.40 0.7928934010152284
> 0.50 0.7682878608145512
> 0.60 0.6384615384615384
> 0.70 0.5784858853721129
> 0.80 0.5454224107458466
> 0.90 0.5220599307333232
> 1 0.5
> e
> 0.6285488958990536 0.6285488958990536
> e
> ############################################
>
> and generates a http://l3s.de/~zerr/example.pdf perfect picture
>
> But whenever I put the data part into extra file it says "Bad datat on
> line 10" this is where the "e" is placed when I try to plot:
> plot 'test.dat' with linespoints notitle, "-" with points pt 7 ps 1.7
> title "BEP 0.63"
>
>
> Thank you very much in advance for you help!
> S.Z
>
>
>
--
View this message in context: http://old.nabble.com/How-to-put-a-particular-value-from-the-data-file-as-lable-tp34028915p34035490.html
Sent from the Gnuplot - User mailing list archive at Nabble.com.
|