Skip to content

Commit

Permalink
Merge pull request #364 from pep-dortmund/update_mpl_notebook
Browse files Browse the repository at this point in the history
Update matplotlib notebook [Closes #362]
  • Loading branch information
chrbeckm committed Sep 28, 2023
2 parents 6075d59 + 628ebf0 commit dc134f3
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions python/matplotlib.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,6 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"scrolled": true,
"tags": []
},
"outputs": [],
Expand Down Expand Up @@ -597,7 +596,6 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"scrolled": false,
"tags": []
},
"outputs": [],
Expand Down Expand Up @@ -629,8 +627,11 @@
"outputs": [],
"source": [
"x = np.linspace(0, 2 * np.pi, 10)\n",
"errX = 0.4 * abs(np.random.standard_normal(len(x)))\n",
"errY = 0.4 * abs(np.random.standard_normal(len(x)))\n",
"\n",
"rng = np.random.default_rng(42)\n",
"\n",
"errX = 0.4 * abs(rng.standard_normal(len(x)))\n",
"errY = 0.4 * abs(rng.standard_normal(len(x)))\n",
"\n",
"fig, ax = plt.subplots()\n",
"\n",
Expand Down Expand Up @@ -770,11 +771,11 @@
"outputs": [],
"source": [
"# Zufallsdaten generieren:\n",
"x = np.random.normal(0, 1, 1000)\n",
"x = rng.normal(0, 1, 1000)\n",
"\n",
"ax.cla()\n",
"ax.hist(x, bins=20)\n",
"# try histtype='stepfilled'\n",
"# try histtype='step'\n",
"fig"
]
},
Expand Down

0 comments on commit dc134f3

Please sign in to comment.