【问题标题】:Gnuplot types of error barsGnuplot 类型的误差线
【发布时间】:2014-06-09 09:22:40
【问题描述】:

我们可以更改 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

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

【问题讨论】:

  • 哦,哇,不知道output '| ...'。 +1 教我:)

标签: plot gnuplot


【解决方案1】:

在您的情况下,最简单的选择是使用 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

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2020-09-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-10-25
    相关资源
    最近更新 更多