\documentclass{standalone}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
title = {ring enrich.},
ybar,
width=10cm,
xtick={1,2},
xticklabels={%
before,
after,
}]
\addplot[
fill=blue!25,
draw=black,
error bars/.cd,
y dir=both,
y explicit
]
table [y error=error] {
x y error
1 6.63 3.95
};
\addplot[
fill=red!25,
draw=black,
error bars/.cd,
y dir=both,
y explicit
]
table [y error=c] {
x y c
2 41.58 8.48
};
\end{axis}
\end{tikzpicture}
\end{document}
Tell me more
×
TeX - LaTeX Stack Exchange is a question and answer site for
users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.
|
|
||||
| show 4 more comments |
closed as too localized by Jake, lockstep, Claudio Fiandrino, Kurt, Paul Gaborit Feb 7 at 12:52
This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, see the FAQ.
|
You can move the bars closer while keeping the overall plot width constant by setting
|
|||
|
|

{}) or select your code and hit Ctrl+K. – Claudio Fiandrino Feb 7 at 9:56