Skip to content

Commit

Permalink
differences for PR #650
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Jun 7, 2023
1 parent 1bcc86b commit 33098a2
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
2 changes: 0 additions & 2 deletions 01-run-quit.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,6 @@ The main work area in JupyterLab enables you to arrange documents (notebooks, te
and other activities (terminals, code consoles, etc.) into panels of tabs that can be resized or
subdivided. A screenshot of the default Main Work Area is provided below.

If you do not see the Launcher tab, click the blue plus sign under the "File" and "Edit" menus and it will appear.

<p align='center'> <img alt="JupyterLab Main Work Area" src="fig/0_jupyterlab_main_work_area.png" width="750"/>
</p>

Expand Down
10 changes: 9 additions & 1 deletion 09-plotting.md
Original file line number Diff line number Diff line change
Expand Up @@ -348,14 +348,22 @@ matplotlib will make this variable refer to a new empty figure.
Therefore, make sure you call `plt.savefig` before the plot is displayed to
the screen, otherwise you may find a file with an empty plot.

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.

```python
plt.tight_layout()
plt.savefig('my_figure.png')
```

When using dataframes, data is often generated and plotted to screen in one line.
In addition to using `plt.savefig`, we can save a reference to the current figure
in a local variable (with `plt.gcf`) and call the `savefig` class method from
in a local variable (with `plt.gcf`) and call the `tight_layout` and `savefig` class method from
that variable to save the figure to file.

```python
data.plot(kind='bar')
fig = plt.gcf() # get current figure
fig.tight_layout()
fig.savefig('my_figure.png')
```

Expand Down
4 changes: 2 additions & 2 deletions md5sum.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
"config.yaml" "4c8c3b66083d754c51eae2c277d24ca0" "site/built/config.yaml" "2023-05-02"
"index.md" "f019634aead94a6e24c7b0a414239caa" "site/built/index.md" "2023-05-03"
"links.md" "fd719a41381bb145880b9220d70edec3" "site/built/links.md" "2023-05-03"
"episodes/01-run-quit.md" "8503041b7590fbc507249282d847cba6" "site/built/01-run-quit.md" "2023-06-07"
"episodes/01-run-quit.md" "29913e0b8a59c867135ac9f1a2b59e56" "site/built/01-run-quit.md" "2023-06-07"
"episodes/02-variables.md" "9dacd8cd9968b5d0185f0c244a55eb84" "site/built/02-variables.md" "2023-05-02"
"episodes/03-types-conversion.md" "9e3a08116a2124cd8e23d1d7c5dba432" "site/built/03-types-conversion.md" "2023-05-02"
"episodes/04-built-in.md" "d3ea4aa2a49667b61cb21a62034c88c6" "site/built/04-built-in.md" "2023-05-02"
"episodes/05-coffee.md" "c7616ec40b9e611c47b2bac1e11c47d2" "site/built/05-coffee.md" "2023-05-02"
"episodes/06-libraries.md" "96899c58843e51f10eb84a8ac20ebb90" "site/built/06-libraries.md" "2023-05-02"
"episodes/07-reading-tabular.md" "b5b65e50037a583dfc5a3a879e4404b0" "site/built/07-reading-tabular.md" "2023-05-02"
"episodes/08-data-frames.md" "d1e90ca9269672f6ef02019d4238636a" "site/built/08-data-frames.md" "2023-06-05"
"episodes/09-plotting.md" "fca733c5f699e089feebdab0dac2b5b3" "site/built/09-plotting.md" "2023-05-02"
"episodes/09-plotting.md" "c83cc9614b5e6de53ff98c5091d4977b" "site/built/09-plotting.md" "2023-06-07"
"episodes/10-lunch.md" "0624bfa89e628df443070e8c44271b33" "site/built/10-lunch.md" "2023-05-02"
"episodes/11-lists.md" "ff1bb5ec301422cf8a4cad6c6429bf4f" "site/built/11-lists.md" "2023-05-02"
"episodes/12-for-loops.md" "1da6e4e57a25f8d4fd64802c2eb682c4" "site/built/12-for-loops.md" "2023-05-02"
Expand Down

0 comments on commit 33098a2

Please sign in to comment.