我想绘制一个条形图,其中每个条形显示标准差(以及置信水平)。我尝试使用以下方法解决方案但我得到了“尺寸太大”的错误。基本上我有这样的数据:
Label Mean Std.dev Confd.Level
l1 value value value
l2 value value value
我尝试了不同的方法,但都无法解决。当前抛出错误的方法如下:
\documentclass{article}
\usepackage{pgfplots}
\usepackage{filecontents}
\pgfplotsset{compat=1.7}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
legend pos=outer north east,
enlargelimits={abs=0.5},
ybar=0pt,
bar width=0.15,
xtick={0.000,...,0.0045},
xticklabels={Light, Medium, Heavy},
x tick label as interval
]
\addplot+[error bars/.cd,
y dir=both,y explicit]
coordinates {
(1,0.0030977691) +- (1.92E-004,1.92E-004)
(1,0.0030376050) +- (1.77E-004,1.77E-004)
(1,0.0029500634) +- (1.58E-004,1.58E-004)
(1,0.0029072753) +- (1.48E-004,1.48E-004)};
%\legend{A,B,C,D}
%\draw ({rel axis cs:0,0}|-{axis cs:0,0}) -- ({rel axis cs:1,0}|-{axis cs:0,0});
\end{axis}
\end{tikzpicture}
\end{document}