Guest User

Untitled

a guest
Jan 22nd, 2019
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. documentclass{standalone}
  2. usepackage{pgfplots}
  3. usepackage{filecontents}
  4. begin{filecontents*}{data.csv}
  5. A,B
  6. 2,1
  7. 3,3
  8. 4,6
  9. 2,2
  10. 3,1
  11. 4,3
  12. 5,3
  13. 6,1
  14. 9,5
  15. 9,1
  16. 1,2
  17. end{filecontents*}
  18. usepackage{pgfplotstable}
  19. begin{document}
  20.  
  21.  
  22.  
  23. begin{tikzpicture}
  24. begin{axis}[
  25. ybar,
  26. /pgf/number format/.cd,
  27. use comma,
  28. 1000 sep={},
  29. title={Percentage of Rows Containing Values},
  30. xlabel={Percentage of Rows},
  31. ylabel={Values},
  32. x label style={at={(axis description cs:0.5,-0.1)},anchor=north},
  33. y label style={at={(axis description cs:0.05,0.5)},anchor=south},
  34. ytick distance=2,
  35. width=textwidth,
  36. height=6cm,
  37. ymin=0,
  38. xticklabel interval boundaries
  39. ]
  40.  
  41. addplot +[
  42. hist={bins=5,
  43. data min=0,
  44. data max=10,
  45. }
  46. ] table[y=A, col sep=comma] {data.csv};
  47.  
  48. end{axis}
  49. end{tikzpicture}
  50. end{document}
Add Comment
Please, Sign In to add comment