diff --git a/doc/code-cells.ipynb b/doc/code-cells.ipynb index 099a9efa..0795fe26 100644 --- a/doc/code-cells.ipynb +++ b/doc/code-cells.ipynb @@ -419,6 +419,34 @@ "fig" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Instead of the default `inline` plotting backend,\n", + "you can also use the `widget` backend\n", + "(which needs the `ipympl` package to be installed):" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "%matplotlib widget" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "fig, ax = plt.subplots(figsize=[6, 3])\n", + "ax.plot([4, 9, 7, 20, 6, 33, 13, 23, 16, 62, 8]);" + ] + }, { "cell_type": "markdown", "metadata": {}, diff --git a/doc/requirements.txt b/doc/requirements.txt index 07489bbe..3c83291b 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -1,6 +1,7 @@ ipykernel numpy matplotlib +ipympl pandas # setuptools seems to be needed for pybtex, see # https://github.com/mcmtroffaes/sphinxcontrib-bibtex/issues/345: