I have a plot with some error bars generated with this code, but the error bars are messed up.
\documentclass{article}
\usepackage{pgfplots}
\pgfplotsset{compat=newest}
\pgfplotsset{
every axis/.append style={
scale only axis,
},
/tikz/every picture/.append style={
baseline,
trim axis left,
trim axis right,
}
}
\begin{document}
\begin{tikzpicture}
\begin{axis}[%
width=4.5in,
height=3.5in,
scale only axis,
xmode=log,
xmin=0.001,
xmax=1,
xminorticks=true,
ymin=0,
ymax=250
]
\addplot [color=blue,solid,forget plot]
plot [error bars/.cd, y dir = both, y explicit]
table[row sep=crcr, y error plus index=2, y error minus index=3]{0.0625469 25.07 0.25 0.25\\
0.0390918 54.77 0.649999999999999 0.649999999999999\\
0.0244324 154.33 1.5 1.5\\
0.0152702 200 5.5 5.5\\
0.00954391 208.67 5.5 5.5\\
0.00596494 215.33 6 6\\
0.00372809 219 2.5 2.5\\
0.00233006 220.67 5 5\\
0.00145628 221 1.5 1.5\\
};
\end{axis}
\end{tikzpicture}%
\end{document}
But if I remove
\pgfplotsset{
every axis/.append style={
scale only axis,
},
/tikz/every picture/.append style={
baseline,
trim axis left,
trim axis right,
}
}
It looks fine. The problem is like that pgfplotset
command early in my document to control all alignment and axis trimming. Any solutions?
Thanks