Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- documentclass{standalone}
- usepackage{pgfplots}
- usepackage{filecontents}
- begin{filecontents*}{data.csv}
- A,B
- 2,1
- 3,3
- 4,6
- 2,2
- 3,1
- 4,3
- 5,3
- 6,1
- 9,5
- 9,1
- 1,2
- end{filecontents*}
- usepackage{pgfplotstable}
- begin{document}
- begin{tikzpicture}
- begin{axis}[
- ybar,
- /pgf/number format/.cd,
- use comma,
- 1000 sep={},
- title={Percentage of Rows Containing Values},
- xlabel={Percentage of Rows},
- ylabel={Values},
- x label style={at={(axis description cs:0.5,-0.1)},anchor=north},
- y label style={at={(axis description cs:0.05,0.5)},anchor=south},
- ytick distance=2,
- width=textwidth,
- height=6cm,
- ymin=0,
- xticklabel interval boundaries
- ]
- addplot +[
- hist={bins=5,
- data min=0,
- data max=10,
- }
- ] table[y=A, col sep=comma] {data.csv};
- end{axis}
- end{tikzpicture}
- end{document}
Add Comment
Please, Sign In to add comment