Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- documentclass{article}
- usepackage{pgfplots}
- begin{document}
- begin{tikzpicture}
- begin{axis}[
- compat=newest,
- ybar = 0.6,
- width=1textwidth,
- height=0.4textheight,
- ymin=0,
- ymax=100,
- enlarge x limits = 0.1,
- x axis line style={opacity=1},
- bar width=20pt,
- legend style={at={(0.5,-0.15)},
- anchor=north,legend columns=0},
- ylabel={[%]},
- symbolic x coords={A, B, C, D, E, F, missing},
- xtick=data,
- nodes near coords,
- axis lines*=left,
- y axis line style={opacity=1},
- cycle list={
- {fill=black!60,draw=black!60},
- {fill=black!40,draw=black!40},
- {fill=black!20,draw=black!20}
- },
- axis on top,
- legend style={draw=none,/tikz/every even column/.append style={column sep=0.5cm}}
- ]
- addplot+[fill=black!10, text=black] coordinates {(A,62.5) (B,0) (C,4.5) (D,11.4) (E,14.8) (F,1.1) (missing,2.3)};
- addplot[fill=black!70,text=black] coordinates {(A,15.0) (B,0) (C,5.8) (D,43.7) (E,18.4) (F,17) (missing,0)};
- legend{sample X, sample Y}
- end{axis}
- end{tikzpicture}
- end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement