Guest User

Untitled

a guest
Nov 21st, 2017
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 KB | None | 0 0
  1. documentclass{report}
  2.  
  3. usepackage{pgfplots} % for histograms
  4.  
  5. begin{document}
  6.  
  7. begin{tikzpicture}
  8. begin{axis}[ height = 0.4paperheight
  9. , width = 0.7paperwidth
  10. ]
  11.  
  12. addplot [ybar interval, color = black, fill = blue, line width = 0.5mm]
  13. table {hist1.data};
  14. end{axis}
  15. end{tikzpicture}
  16.  
  17. end{document}
  18.  
  19. 1 0.06
  20. 3 0.23
  21. 5 0.35
  22. 7 0.2
  23. 9 0.1
  24. 11 0.04
  25. 13 0.01
  26. 15 0
  27. 17 0
  28. 19 0.01
  29. 21 0
  30.  
  31. documentclass{report}
  32.  
  33. usepackage{pgfplots} % for histograms
  34. usepackage{filecontents}
  35. begin{filecontents*}{hist1.data}
  36. 1 0.06
  37. 3 0.23
  38. 5 0.35
  39. 7 0.2
  40. 9 0.1
  41. 11 0.04
  42. 13 0.01
  43. 15 0
  44. 17 0
  45. 19 0.01
  46. 21 0
  47. end{filecontents*}
  48. begin{document}
  49.  
  50. begin{tikzpicture}
  51. begin{axis}[
  52. height = 0.4paperheight,
  53. width = 0.7paperwidth,
  54. ytick=data,xtick=data
  55. ]
  56.  
  57. addplot [ybar interval, color = black, fill = blue, line width = 0.5mm]
  58. table {hist1.data};
  59. end{axis}
  60. end{tikzpicture}
  61.  
  62. end{document}
Add Comment
Please, Sign In to add comment