plt.hist() normed renamed to density
parent
8b00e3130d
commit
8fb49ea7e0
|
@ -368,8 +368,8 @@
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
"plt.hist(np.random.rand(100000), normed=True, bins=100, histtype=\"step\", color=\"blue\", label=\"rand\")\n",
|
"plt.hist(np.random.rand(100000), density=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.randn(100000), density=True, bins=100, histtype=\"step\", color=\"red\", label=\"randn\")\n",
|
||||||
"plt.axis([-2.5, 2.5, 0, 1.1])\n",
|
"plt.axis([-2.5, 2.5, 0, 1.1])\n",
|
||||||
"plt.legend(loc = \"upper left\")\n",
|
"plt.legend(loc = \"upper left\")\n",
|
||||||
"plt.title(\"Random distributions\")\n",
|
"plt.title(\"Random distributions\")\n",
|
||||||
|
|
Loading…
Reference in New Issue