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.

4

1 回答 1

0

要控制盒装标签的外观,请使用set style textbox

这是一个完整的脚本,包括将生成的 eps 转换为 png 以显示,这也适用于 postscript 终端:

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')

结果是confrontopolare.png

在此处输入图像描述

于 2015-09-16T15:43:36.497 回答