plt.hist() normed renamed to density

main
Aurélien Geron 2020-04-24 16:49:42 +12:00
parent 8b00e3130d
commit 8fb49ea7e0
1 changed files with 2 additions and 2 deletions

View File

@ -368,8 +368,8 @@
"metadata": {},
"outputs": [],
"source": [
"plt.hist(np.random.rand(100000), normed=True, bins=100, histtype=\"step\", color=\"blue\", label=\"rand\")\n",
"plt.hist(np.random.randn(100000), normed=True, bins=100, histtype=\"step\", color=\"red\", label=\"randn\")\n",
"plt.hist(np.random.rand(100000), density=True, bins=100, histtype=\"step\", color=\"blue\", label=\"rand\")\n",
"plt.hist(np.random.randn(100000), density=True, bins=100, histtype=\"step\", color=\"red\", label=\"randn\")\n",
"plt.axis([-2.5, 2.5, 0, 1.1])\n",
"plt.legend(loc = \"upper left\")\n",
"plt.title(\"Random distributions\")\n",