mirror of
https://github.com/ArthurDanjou/handson-ml3.git
synced 2026-01-14 12:14:36 +01:00
plt.hist() normed renamed to density
This commit is contained in:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user