Compare commits
2 Commits
74518e7daf
...
4f92b12704
| Author | SHA1 | Date | |
|---|---|---|---|
| 4f92b12704 | |||
| 882b590865 |
@@ -20,6 +20,7 @@ fig, ax = plt.subplots()
|
||||
textstr = '\n'.join((
|
||||
r'$n=%d$' % (len(data)),
|
||||
r'$\mu=%.2f$' % (mean, ),
|
||||
r'$\sigma=%.2f$' % (stddev, ),
|
||||
r'$P=%.2f$' % (prob, ),
|
||||
r'$I=%.2f$ bits' % (info, )))
|
||||
# these are matplotlib.patch.Patch properties
|
||||
@@ -30,7 +31,7 @@ ax.text(0.05, 0.95, textstr, transform=ax.transAxes, fontsize=14,
|
||||
verticalalignment='top', bbox=props)
|
||||
|
||||
x = np.linspace(mean-3*stddev, mean+3*stddev, 500)
|
||||
y = norm.pdf(x, mean, stddev)
|
||||
y = norm.pdf(x, loc=mean, scale=stddev) * stddev#rescale back to unity area
|
||||
plt.axvline(x=mean, color="green", linestyle="dashed", label="mean")
|
||||
plt.axvline(lowerbound, color="red")
|
||||
plt.axvline(upperbound, color="red")
|
||||
|
||||
Reference in New Issue
Block a user