我正在使用相同的线型(ls 1
)绘制多个数据文件。但是,我想使用wrd_pt
下面代码中包含的不同点类型来区分数据。
结果显示在图中,其中GNUPLOT将变量中包含的值(wrd_pt
而不是与每个数字关联的符号(正方形,三角形,...))绘制为点类型。我正在使用,GNUPLOT 5.0
并且没有任何方法可以更新它(我不是正在使用的计算机的sudoer)以将数组用于5.2版。
有谁知道我该如何解决?
[... initializing ...]
wrd_pt ="5 7 9 11 13 15"
[... some other piece of code ...]
set output "plot_1a.eps"
plot for [i=1:words(fspo_one)] work_dir.word(fspo_one, i) u 1:5 w lp ls 1 pt word(wrd_pt, i) ps 1 notitle
unset output
为什么不使用绘图样式with labels
?也可以与gnuplot 5.0一起使用。
像这样:
码:
### point types as string from a string
reset session
wrd_pt = "5 7 9 11 13 15"
set xrange[0:10]
set style textbox opaque
set samples 10
plot for [i=1:words(wrd_pt)] '+' u 1:(i*$1**2) w l lw 2 notitle, \
for [i=1:words(wrd_pt)] '+' u 1:(i*$1**2):(word(wrd_pt,i)) w labels boxed notitle
### end of code
结果:
!我没有考虑过。大。