首页 > 解决方案 > GNUPlot 中具有不同行为的错误栏

问题描述

我有一个数据集,其中第 3 行、第 5 行和第 7 行分别是前几行的置信区间。例如:

0.1     0.53    0.51    0.29    0.28    0.13    0.12
0.2     0.54    0.53    0.31    0.30    0.14    0.13
0.3     0.57    0.56    0.32    0.31    0.14    0.14
0.4     0.60    0.59    0.34    0.33    0.15    0.15
0.5     0.64    0.63    0.36    0.35    0.16    0.16
0.6     0.69    0.68    0.38    0.37    0.18    0.17
0.7     0.73    0.72    0.41    0.40    0.19    0.18
0.8     0.82    0.80    0.45    0.44    0.22    0.21
0.9     0.88    0.86    0.48    0.47    0.24    0.23
1.0     0.98    0.96    0.53    0.51    0.27    0.27

绘制图形时,误差条变得很大,明显错误,如图: 在此处输入图像描述

我的脚本很简单,但它没有按我的预期工作。有人可以指出我的错误吗?

我的脚本:

    reset
set termopt enhanced
set encoding iso_8859_1
set datafile missing '-'

set ylabel 'NDT normalized by symmetrical case'
set xlabel 'Delivery probality'

unset log                              

unset label                           

set ytic auto                         
set xtic auto

set yrange [0:*]

set terminal png size 800,600 enhanced font "Arial,16"  
set output 'prob_normal.png' # setando o nome da saída

set key center top inside 

f(x) = x

plot "prob-normal.dat" using ($1):($2) title "DC 10.98%" with linespoints ls 1, \
"prob-normal.dat" using ($1):($2):($3) notitle with yerrorbars,\
"prob-normal.dat" using ($1):($4) title "DC 19.35%" with linespoints ls 2, \
"prob-normal.dat" using ($1):($4):($5) notitle with yerrorbars,\
"prob-normal.dat" using ($1):($6) title "DC 42.85%"  with linespoints ls 3, \
"prob-normal.dat" using ($1):($6):($7) notitle with yerrorbars

标签: graphgraphqlgnuplot

解决方案


推荐阅读