Last active
June 20, 2017 09:24
-
-
Save AlexDel/cbdf32cf92d9e81f13d855e720e099da to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import matplotlib.pyplot as plt | |
from scipy.stats import norm | |
data = np.random.normal(7.3, 1.43, 20) | |
d = [x for x in np.ceil(data) if x <= 10] | |
plt.hist(d, bins=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], range=(1,11), color="red", align="left") | |
plt.title('Title') | |
plt.show() | |
def plotMe(mean, std, color, title): | |
data = np.random.normal(mean, std, 40) | |
d = [x for x in np.ceil(data) if x <= 10] | |
plt.hist(d, bins=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], range=(1,11), color=color, align="left") | |
plt.title(title) | |
plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment