Gnuplot类型的误差线

万寿菊

我们可以在错误栏中更改gnuplot使用的线的类型吗?这是我的gnuplot代码:

set terminal postscript eps color
set output '| epstopdf --filter --outfile=plot.pdf'
set xlabel  "Simulation days"
set xtics nomirror
set ylabel  "Time (seconds)"
set ytics nomirror
set logscale y
set key left top
plot "data1.csv" using 1:($2/1000):($3/1000) with yerrorbars pt 5,\
"data2.csv" using 1:($2/1000):($3/1000) with yerrorbars pt 7

第一个图的误差线与第二个图的误差线不同。第一行是实线,但第二行是虚线。是否可以定义错误栏的样式?

克里斯多夫

在您的情况下,最简单的选择是使用solid终端选项仅包含实线:

set terminal postscript eps color solid lw 3
set output '| epstopdf --filter --outfile=plot.pdf'

set samples 10
set xrange [0:10]
unset key

plot '+' using 1:1:(0.2*$1) w yerrorbars, \
     '' using 1:(1.5*$1):(0.1*$1) w yerrorbars

4.6.4的结果:

在此处输入图片说明

或者,您可以使用lt 1 lc 2第二个绘图,该绘图选择第一个线型(实线)的线型和第二个线型的颜色:

plot '+' using 1:1:(0.2*$1) w yerrorbars, \
     '' using 1:(1.5*$1):(0.1*$1) lt 1 lc 2 w yerrorbars

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章