Skip to content

[Doc]: the matplotlib notebook magic requires notebook<7 #27144

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

Closed
qci-amos opened this issue Oct 19, 2023 · 6 comments
Closed

[Doc]: the matplotlib notebook magic requires notebook<7 #27144

qci-amos opened this issue Oct 19, 2023 · 6 comments
Milestone

Comments

@qci-amos
Copy link

Documentation Link

https://matplotlib.org/stable/users/explain/figure/interactive.html#jupyter-notebooks-jupyterlab

Problem

As discussed in this issue:
jupyter/notebook#7115

it sounds like the wording in the documentation should be clarified because a user installing unpinned dependencies will run into a problem with old notebooks.

Suggested improvement

Instead of:

If you only need to use the classic notebook, you can use

it could say

If you only need to use the classic notebook (i.e., notebook<7), you can use

(I'd also suggest a better error message somewhere)

@jklymak
Copy link
Member

jklymak commented Oct 19, 2023

That seems reasonable, though I find that whole section somewhat convoluted. Probably should be fixed in figure intro as well. Any interest in making a PR?

@qci-amos
Copy link
Author

I'm not qualified to make a PR! 😄 I'm just wearing a devops hat here.

@tacaswell tacaswell added this to the v3.8.1 milestone Oct 19, 2023
@mattymo30
Copy link
Contributor

I would like to take a stab at this, at the very least fixing the wording suggested above.

@qci-amos
Copy link
Author

An important detail to us that we've noticed is that with notebook==7 the fix:

%matplotlib widget

isn't sufficient for us. We're interested in more than just basic interactivity (e.g., panning, zooming) but also live updating, for example, the plot changing as data streams in. This is the closest issue to our problem that we've found: matplotlib/ipympl#290

Probably this isn't relevant to the PR in progress; I'm just making a note of functionality that has changed between versions 6 and 7 of notebook.

@tacaswell
Copy link
Member

@qci-amos ipympl should support all of that functionality. You may need to create the figure a cell before the cell where you stream data into it though.

@ksunden ksunden modified the milestones: v3.8.1, v3.8.2 Oct 31, 2023
@ksunden
Copy link
Member

ksunden commented Oct 31, 2023

Closed by #27165

@ksunden ksunden closed this as completed Oct 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants