Skip to content

Commit 33098a2

Browse files
committed
differences for PR #650
1 parent 1bcc86b commit 33098a2

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

01-run-quit.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,8 +188,6 @@ The main work area in JupyterLab enables you to arrange documents (notebooks, te
188188
and other activities (terminals, code consoles, etc.) into panels of tabs that can be resized or
189189
subdivided. A screenshot of the default Main Work Area is provided below.
190190

191-
If you do not see the Launcher tab, click the blue plus sign under the "File" and "Edit" menus and it will appear.
192-
193191
<p align='center'> <img alt="JupyterLab Main Work Area" src="fig/0_jupyterlab_main_work_area.png" width="750"/>
194192
</p>
195193

09-plotting.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,14 +348,22 @@ matplotlib will make this variable refer to a new empty figure.
348348
Therefore, make sure you call `plt.savefig` before the plot is displayed to
349349
the screen, otherwise you may find a file with an empty plot.
350350

351+
Sometimes, some elements of the figure may get truncated when saving the figure to a file. You can find an in-depth explanation why this happens [here](https://matplotlib.org/stable/tutorials/intermediate/tight_layout_guide.html). To avoid this, we can call `plt.tight_layout` before `plt.savefig` to make sure that everything fits into the figure area.
352+
353+
```python
354+
plt.tight_layout()
355+
plt.savefig('my_figure.png')
356+
```
357+
351358
When using dataframes, data is often generated and plotted to screen in one line.
352359
In addition to using `plt.savefig`, we can save a reference to the current figure
353-
in a local variable (with `plt.gcf`) and call the `savefig` class method from
360+
in a local variable (with `plt.gcf`) and call the `tight_layout` and `savefig` class method from
354361
that variable to save the figure to file.
355362

356363
```python
357364
data.plot(kind='bar')
358365
fig = plt.gcf() # get current figure
366+
fig.tight_layout()
359367
fig.savefig('my_figure.png')
360368
```
361369

md5sum.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44
"config.yaml" "4c8c3b66083d754c51eae2c277d24ca0" "site/built/config.yaml" "2023-05-02"
55
"index.md" "f019634aead94a6e24c7b0a414239caa" "site/built/index.md" "2023-05-03"
66
"links.md" "fd719a41381bb145880b9220d70edec3" "site/built/links.md" "2023-05-03"
7-
"episodes/01-run-quit.md" "8503041b7590fbc507249282d847cba6" "site/built/01-run-quit.md" "2023-06-07"
7+
"episodes/01-run-quit.md" "29913e0b8a59c867135ac9f1a2b59e56" "site/built/01-run-quit.md" "2023-06-07"
88
"episodes/02-variables.md" "9dacd8cd9968b5d0185f0c244a55eb84" "site/built/02-variables.md" "2023-05-02"
99
"episodes/03-types-conversion.md" "9e3a08116a2124cd8e23d1d7c5dba432" "site/built/03-types-conversion.md" "2023-05-02"
1010
"episodes/04-built-in.md" "d3ea4aa2a49667b61cb21a62034c88c6" "site/built/04-built-in.md" "2023-05-02"
1111
"episodes/05-coffee.md" "c7616ec40b9e611c47b2bac1e11c47d2" "site/built/05-coffee.md" "2023-05-02"
1212
"episodes/06-libraries.md" "96899c58843e51f10eb84a8ac20ebb90" "site/built/06-libraries.md" "2023-05-02"
1313
"episodes/07-reading-tabular.md" "b5b65e50037a583dfc5a3a879e4404b0" "site/built/07-reading-tabular.md" "2023-05-02"
1414
"episodes/08-data-frames.md" "d1e90ca9269672f6ef02019d4238636a" "site/built/08-data-frames.md" "2023-06-05"
15-
"episodes/09-plotting.md" "fca733c5f699e089feebdab0dac2b5b3" "site/built/09-plotting.md" "2023-05-02"
15+
"episodes/09-plotting.md" "c83cc9614b5e6de53ff98c5091d4977b" "site/built/09-plotting.md" "2023-06-07"
1616
"episodes/10-lunch.md" "0624bfa89e628df443070e8c44271b33" "site/built/10-lunch.md" "2023-05-02"
1717
"episodes/11-lists.md" "ff1bb5ec301422cf8a4cad6c6429bf4f" "site/built/11-lists.md" "2023-05-02"
1818
"episodes/12-for-loops.md" "1da6e4e57a25f8d4fd64802c2eb682c4" "site/built/12-for-loops.md" "2023-05-02"

0 commit comments

Comments
 (0)