Advertisement
Guest User

Untitled

a guest
Jul 18th, 2019
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. documentclass{article}
  2. usepackage{pgfplots}
  3.  
  4. begin{document}
  5.  
  6. begin{tikzpicture}
  7. begin{axis}[
  8. compat=newest,
  9. ybar = 0.6,
  10. width=1textwidth,
  11. height=0.4textheight,
  12. ymin=0,
  13. ymax=100,
  14. enlarge x limits = 0.1,
  15. x axis line style={opacity=1},
  16. bar width=20pt,
  17. legend style={at={(0.5,-0.15)},
  18. anchor=north,legend columns=0},
  19. ylabel={[%]},
  20. symbolic x coords={A, B, C, D, E, F, missing},
  21. xtick=data,
  22. nodes near coords,
  23. axis lines*=left,
  24. y axis line style={opacity=1},
  25. cycle list={
  26. {fill=black!60,draw=black!60},
  27. {fill=black!40,draw=black!40},
  28. {fill=black!20,draw=black!20}
  29. },
  30. axis on top,
  31. legend style={draw=none,/tikz/every even column/.append style={column sep=0.5cm}}
  32. ]
  33.  
  34. 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)};
  35. 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)};
  36.  
  37. legend{sample X, sample Y}
  38.  
  39. end{axis}
  40. end{tikzpicture}
  41.  
  42. end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement