Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- documentclass[tikz,border=3.14mm]{standalone}
- usepackage{pgfplots}
- begin{filecontents}{example.dat}
- 71
- 54
- 55
- 54
- 98
- 76
- 93
- 95
- 86
- 88
- 68
- 68
- 50
- 61
- 79
- 79
- 73
- 57
- 56
- 57
- 97
- 80
- 91
- 94
- 85
- 88
- 45
- 58
- 78
- 81
- 74
- 60
- 57
- 58
- 95
- 81
- end{filecontents}
- begin{document}
- begin{tikzpicture}
- begin{axis}[ybar, ymin=0]
- addplot[fill=black,
- hist={
- bins=11
- }] table [y index=0] {example.dat};
- end{axis}
- end{tikzpicture}
- end{document}
- pgfplotstableread{example.dat}table
- pgfplotstablegetrowsof{table}
- pgfmathsetmacro{R}{pgfplotsretval-1}
- pgfplotsinvokeforeach{0,...,R}{
- pgfplotstablegetelem{#1}{0}of{table}
- pgfmathsetmacro value {pgfplotsretval}
- % sum up all e^0.5(value-x)/sigma somhow
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement