Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

On opening an existing notebook with widget fallback output to a different mimetype #12611

Closed
3 tasks done
DonJayamanne opened this issue Jan 23, 2023 · 2 comments
Closed
3 tasks done

Comments

@DonJayamanne
Copy link
Contributor

DonJayamanne commented Jan 23, 2023

On opening an existing notebook with widget fallback output to a different mimetype if an ipywidget needs an active kernel connection
Refs: #8635

Complexity: 5

Authors: @DonJayamanne

Create Issue

Create Issue


Requirements

  • Install prerelease jupyter extension into VS Code (desktop or http://insiders.vscode.dev)
  • Have a python environment that you can run jupyter from. (https://jupyter.org/install)
  • Be familiar with jupyter notebooks
  • Have ipywidgets installed into your python environment using the command python -m pip install ipywidgets
  • Install matplot lib pip install matplotlib ipympl

Setup

  • Run a cell with the following code
%matplotlib widget

from matplotlib import pyplot as plt

fig, ax = plt.subplots()
ax.plot([0,1,2], [2,3,4] ,"o-")
  • Verify the widget is rendered and you can interact with the widget using the controls in the output (such as panning, zoom, etc)
  • Close the notebook and re-open the notebook
  • Verify you can still see a plot (this time its not interactive)
  • Re-load VSCode and open the same notebook and you should still see the plot displayed (though its not interactive)
@roblourens
Copy link
Member

Does this work by redirecting the interactive renderer to a primitive one? Because it says it's rendering the ipywidget when I guess it's actually rendering a png
image

It works as described but it seems backwards that you would tell me you are using an interactive renderer when that is not the case

@roblourens
Copy link
Member

Btw regarding the complexity on this, I feel that it would be complexity 5 for other team members, but for the manually assigned people, it is not difficult to verify :)

@roblourens roblourens removed their assignment Jan 24, 2023
@amunger amunger removed their assignment Jan 24, 2023
@rebornix rebornix removed their assignment Jan 24, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 10, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants