« Python pour le calcul scientifique/Statistiques » : différence entre les versions
Python pour le calcul scientifique/Statistiques (modifier)
Version du 23 mars 2019 à 12:52
, il y a 4 ans→Fréquence, histogramme : précision
m (→Fréquence, histogramme : simplification légende) |
m (→Fréquence, histogramme : précision) |
||
[[Fichier:Histogramme loi normale 50 ech numpy pyplot.png|vignette|Histogramme tracé avec Python/Numpy/Matplotlib.]]
La fonction <code>histogram()</code>
Pour tracer l'histogramme, nous disposons de la fonction <code>matplotlib.pyplot.hist()</code> :
<source lang="python">
M = np.random.randn(
plt.plot(M, np.ones_like(M), "|")
plt.hist(M, bins=10, density=1)
|