I use GNUPLOT a lot and I have a question for which I have not found an answer in the very dense documentation. With "set label" I can write a text starting at a position I decide in the command. I wonder if there is any way to extract the screen coordinates where the text ends because I would like to add another graphical item there. The position of the end of the text depend on many things like font type and size and the overall scaling of the plot and the terminal type so I do not know how to calculate this position myself.
1 Answer
Check help enhanced text. What about something like:
set label 1 "text before ~O{.0 C} and after" Code:
### enhanced text mode: overprint set xrange[0:20] set yrange [8:25] do for [i=10:24:2] { set label i "text before ~O{.0 C} and after" at 1,i font sprintf('",%d"',i) } plot x ### end of code Result:
1 Comment
theozh
@BoSundman, by the way... is this an acceptable answer? Did this solve your problem?

set label 1 "This is the end" right at screen 0.5,0.5, i.e. a right alignment of the text. But that's probably not what you are looking for?!