2

I have a set of data, corresponding to N points of a parametric curve, defined by x(t),y(t),t. I would like to plot the curve in the x,y plane, putting a label with t value beside each point. I must use label command on each point or it is possible to use a specific plot type?

Many thanks! I've the only problem that the label appear without background and hence they are confused with the line connecting two points. Here, http://www.gnuplot.info/demo_svg_5.0/datastrings.html, on the last example, the author proposes the use of boxed option in the plot, which gives exactly what I'm searching for.

plot 'confrontopolare.csv' using 2:3 with l lw 3 
replot 'confrontopolare.csv' using 2:3:1 with labels center boxed font ",12" notitle

However, it seems that "boxed" only works in particular terminal types. There's any way to obtain the same effect in a postscript eps?

data set:

a 1. 2.

b 2. 4.

1 Answers1

0

To control the appearance of the boxed labels use set style textbox:

Here is a full script, including the conversion of the resulting eps to png to show, that this works also with the postscript terminal:

set terminal postscript eps color colortext
set output 'confrontopolare.eps'

set border back
set style textbox opaque border
plot 'confrontopolare.csv' using 2:3 with l lw 3,\
     '' using 2:3:1 with labels center boxed font ",30" notitle

set output
system('convert -density 200 confrontopolare.eps confrontopolare.png')

which gives as result confrontopolare.png:

enter image description here

Christoph
  • 47,569
  • 8
  • 87
  • 187