Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- documentclass{article}
- usepackage{pgfplots}
- begin{document}
- begin{tikzpicture}
- begin{axis}[
- title = {X},
- width=7cm,
- height= 9cm,
- xtick={1,...,3},
- xticklabels={%
- c1,
- c2,
- c3},
- ybar,
- ymajorgrids=true,
- x tick label style={rotate=45,anchor=east},
- x=70,
- bar width=0.5cm,
- enlarge x limits={abs=0.5cm},
- ylabel = {V},
- legend pos=outer north east,
- enlarge y limits={0.55,upper},
- enlarge y limits={0.386,lower},
- enlarge x limits=0.25
- ]
- addplot[
- fill=blue!25,
- draw=black,
- point meta=y,
- every node near coord/.style={inner ysep=10pt},
- error bars/.cd,
- y dir=both,
- y explicit
- ]
- table [y error=error] {
- x y error label
- 1 9.642857143 1.949620581 1
- 2 9.357142857 2.767338661 2
- 3 11.85714286 3.907084095 3
- };
- addplot[
- fill=red!25,
- draw=black,
- point meta=y,
- every node near coord/.style={inner ysep=10pt},
- error bars/.cd,
- y dir=both,
- y explicit
- ]
- table [y error=error] {
- x y error label
- 1 9.071428571 2.520325538 1
- 2 8.642857143 4.26961261 1
- 3 7.0714286 2.4042904 1
- };
- draw ({rel axis cs:0,0}|-{axis cs:0,0}) -- ({rel axis cs:1,0}|-{axis cs:0,0});
- legend{one,two}
- end{axis}
- end{tikzpicture}
- end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement