我有一组数据,对应于参数曲线的N个点,由x(t),y(t),t定义。我想在x,y平面上绘制曲线,在每个点旁边放置一个带t值的标签。我必须在每个点上使用label命令,否则可以使用特定的绘图类型?
非常感谢!我唯一的问题是标签没有背景而出现,因此它们与连接两个点的线混淆。在这里,http://www.gnuplot.info/demo_svg_5.0/datastrings.html,在最后一个例子中,作者建议在图中使用盒装选项,这正是我正在搜索的内容。
plot 'confrontopolare.csv' using 2:3 with l lw 3
replot 'confrontopolare.csv' using 2:3:1 with labels center boxed font ",12" notitle
然而,似乎"盒装"仅适用于特定的终端类型。有没有办法在postscript eps中获得相同的效果?
数据集:
a 1. 2。
b 2. 4。
答案 0 :(得分: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
: