|
310 | 310 | "source": [ |
311 | 311 | "### Plots\n", |
312 | 312 | "\n", |
313 | | - "The output formats for Matplotlib plots can be customized.\n", |
314 | | - "You'll need separate settings for the Jupyter Notebook application and for `nbsphinx`.\n", |
| 313 | + "The output formats for Matplotlib plots can be customized\n", |
| 314 | + "via the IPython configuration file `ipython_kernel_config.py`.\n", |
| 315 | + "This file can be either\n", |
| 316 | + "in the directory where your notebook is located\n", |
| 317 | + "(see the [ipython_kernel_config.py](ipython_kernel_config.py) in this directory),\n", |
| 318 | + "or in your profile directory\n", |
| 319 | + "(typically `~/.ipython/profile_default/ipython_kernel_config.py`).\n", |
| 320 | + "To find out your IPython profile directory, use this command:\n", |
| 321 | + "\n", |
| 322 | + " python3 -m IPython profile locate\n", |
| 323 | + "\n", |
| 324 | + "A local `ipython_kernel_config.py` in the notebook directory\n", |
| 325 | + "also works on https://mybinder.org/.\n", |
| 326 | + "Alternatively, you can create a file with those settings in a file named\n", |
| 327 | + "`.ipython/profile_default/ipython_kernel_config.py` in your repository.\n", |
| 328 | + "\n", |
315 | 329 | "\n", |
316 | 330 | "If you want to use SVG images for Matplotlib plots,\n", |
317 | 331 | "add this line to your IPython configuration file:\n", |
|
342 | 356 | "For more details on these and other settings, have a look at\n", |
343 | 357 | "[Default Values for Matplotlib's \"inline\" Backend](https://nbviewer.jupyter.org/github/mgeier/python-audio/blob/master/plotting/matplotlib-inline-defaults.ipynb).\n", |
344 | 358 | "\n", |
345 | | - "The configuration file `ipython_kernel_config.py` can be either\n", |
346 | | - "in the directory where your notebook is located\n", |
347 | | - "(see the [ipython_kernel_config.py](ipython_kernel_config.py) in this directory),\n", |
348 | | - "or in your profile directory\n", |
349 | | - "(typically `~/.ipython/profile_default/ipython_kernel_config.py`).\n", |
350 | | - "To find out your IPython profile directory, use this command:\n", |
351 | | - "\n", |
352 | | - " python3 -m IPython profile locate\n", |
353 | | - "\n", |
354 | | - "A local `ipython_kernel_config.py` in the notebook directory\n", |
355 | | - "also works on https://mybinder.org/.\n", |
356 | | - "Alternatively, you can create a file with those settings in a file named\n", |
357 | | - "`.ipython/profile_default/ipython_kernel_config.py` in your repository.\n", |
358 | | - "\n", |
359 | | - "To get SVG and PDF plots for `nbsphinx`,\n", |
360 | | - "use something like this in your `conf.py` file:\n", |
| 359 | + "If you for some reason can't use a `ipython_kernel_config.py` file,\n", |
| 360 | + "you can also change these settings with\n", |
| 361 | + "[nbsphinx_execute_arguments](usage.ipynb#nbsphinx_execute_arguments)\n", |
| 362 | + "in your `conf.py` file:\n", |
361 | 363 | "\n", |
362 | 364 | "```python\n", |
363 | 365 | "nbsphinx_execute_arguments = [\n", |
|
679 | 681 | ] |
680 | 682 | }, |
681 | 683 | { |
| 684 | + "cell_type": "markdown", |
| 685 | + "metadata": {}, |
682 | 686 | "source": [ |
683 | 687 | "#### Troubleshooting\n", |
684 | 688 | "\n", |
|
708 | 712 | "\n", |
709 | 713 | "- If the widgets are **not displayed**, see [#519](https://github.com/spatialaudio/nbsphinx/issues/519).\n", |
710 | 714 | "- If the widgets are **displayed multiple times**, see [#378](https://github.com/spatialaudio/nbsphinx/issues/378)." |
711 | | - ], |
712 | | - "cell_type": "markdown", |
713 | | - "metadata": {} |
| 715 | + ] |
714 | 716 | }, |
715 | 717 | { |
716 | 718 | "cell_type": "markdown", |
|
868 | 870 | "name": "python", |
869 | 871 | "nbconvert_exporter": "python", |
870 | 872 | "pygments_lexer": "ipython3", |
871 | | - "version": "3.7.5" |
| 873 | + "version": "3.9.9" |
872 | 874 | } |
873 | 875 | }, |
874 | 876 | "nbformat": 4, |
|
0 commit comments