Skip to content

Commit 1b0361d

Browse files
committed
small changes only
1 parent cccc292 commit 1b0361d

1 file changed

Lines changed: 8 additions & 7 deletions

File tree

notebooks/12_matplotlib-and-seaborn.ipynb

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@
2828
"\n",
2929
"`matplotlib` is a huge module and we will only introduce you to a few plotting tools today.\n",
3030
"\n",
31-
"In order to make plots work in Jupyter we need to use a 'magic' command: `%matplotlib inline`\n",
31+
"In order to make Jupyter show plots just saved with command `plt.savefig()` we need to use a 'magic' command: `%matplotlib inline`\n",
3232
"\n",
3333
"Most of the functions we will need are in the `matplotlib.pyplot` submodule - so we will only import that today.\n",
3434
"\n",
35-
"<div style=\"background-color:#cdefff; border-radius: 5px; padding: 10pt\"><strong>Task:</strong> In the cell below, add a line to import the <code style=\"background-color:#cdefff\">matplotlib.pyplot</code> submodule. It is convential to give this the alias <code style=\"background-color:#cdefff\">mpl</code>. In the same cell import the `pandas` module.</div>\n",
35+
"<div style=\"background-color:#cdefff; border-radius: 5px; padding: 10pt\"><strong>Task:</strong> In the cell below, add a line to import the <code style=\"background-color:#cdefff\">matplotlib.pyplot</code> submodule. It is convential to give this the alias <code style=\"background-color:#cdefff\">plt</code>. In the same cell import the `pandas` module.</div>\n",
3636
"\n",
3737
"<br>\n",
3838
"<div style=\"background-color:#cdefff; border-radius: 5px; padding: 10pt\"><strong>Task:</strong> Find the matplotlib Documentation on-line. Can you easily navigate the documentation to find useful functions?</div>"
@@ -142,8 +142,9 @@
142142
"import seaborn as sns\n",
143143
"\n",
144144
"# Create a plot of sepal_length vs sepal_width where colour (hue) is controlled by the species\n",
145-
"# height controls the figure height in inches\n",
146-
"# truncate prevents the regression extending beyond the data\n",
145+
"#\n",
146+
"# 'height' controls the figure height in inches\n",
147+
"# 'truncate' prevents the regression extending beyond the data\n",
147148
"sns.lmplot(x='sepal_length',y='sepal_width',data=iris,hue='species',height=5,truncate=True)\n",
148149
"\n",
149150
"# Save figure\n",
@@ -154,9 +155,9 @@
154155
"cell_type": "markdown",
155156
"metadata": {},
156157
"source": [
157-
"### Faceted Plotting with `seaborn`\n",
158+
"### Faceted plotting with `seaborn`\n",
158159
"\n",
159-
"Isn't that a lot simpler!\n",
160+
"Isn't that a lot simpler?!\n",
160161
"\n",
161162
"`seaborn` is doing all the hard work for you - it creates the figure, the scatter plots, the legend and it does the regression and plots the model with error bounds too.\n",
162163
"\n",
@@ -279,7 +280,7 @@
279280
"name": "python",
280281
"nbconvert_exporter": "python",
281282
"pygments_lexer": "ipython3",
282-
"version": "3.7.3"
283+
"version": "3.7.1"
283284
}
284285
},
285286
"nbformat": 4,

0 commit comments

Comments
 (0)