From 9f1d91df5e92a315c61a8a638dd52777960cf254 Mon Sep 17 00:00:00 2001 From: David Rotermund <54365609+davrot@users.noreply.github.com> Date: Wed, 13 Dec 2023 17:51:32 +0100 Subject: [PATCH] Update README.md Signed-off-by: David Rotermund <54365609+davrot@users.noreply.github.com> --- workflow/vscode_interactive/README.md | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/workflow/vscode_interactive/README.md b/workflow/vscode_interactive/README.md index ec5416f..915d90a 100644 --- a/workflow/vscode_interactive/README.md +++ b/workflow/vscode_interactive/README.md @@ -16,7 +16,11 @@ Questions to [David Rotermund](mailto:davrot@uni-bremen.de) If you don't know what I am talking about, please read: [Python Interactive window](https://code.visualstudio.com/docs/python/jupyter-support-py) -## Interactive plotting in # %% cells​ +## [Interactive plotting in # %% cells​](https://matplotlib.org/ipympl/) + +```shell +pip install ipympl +``` We can activate the interactive plotting mode via ​ @@ -70,6 +74,15 @@ print(handles) [, , , , , , , Text(0.5, 1.0, ''), Text(0.0, 1.0, ''), Text(1.0, 1.0, ''), ] ``` +You can use + +```python +display(fig) +``` + +for replotting the plot. However you will get a message from VS Code that display is not defined. It is defined but it doesn't know it. + + This allows us to do this: ```python