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

plt.ioff() not preventing automatic figure generation in jupyter #21

Open
nvaytet opened this issue Oct 10, 2022 · 0 comments
Open

plt.ioff() not preventing automatic figure generation in jupyter #21

nvaytet opened this issue Oct 10, 2022 · 0 comments

Comments

@nvaytet
Copy link

nvaytet commented Oct 10, 2022

Using plt.interactive(False) or plt.ioff() in Jupyter (Lab and classic notebook) does not seem to prevent automatic figure generation, unless the magic %matplotlib inline in run first, even though the inline backend is the default.

Example

import matplotlib.pyplot as plt

plt.ioff()

fig, ax = plt.subplots()
a = 0

The figure still appears automatically under the cell.
Screenshot at 2022-08-29 14-25-08

Note that

Explicitly running %matplotlib inline blocks figure creation (even though inline is the default activated backend in Jupyter):
Screenshot at 2022-08-29 14-26-48

Originally posted in matplotlib/matplotlib#23766

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant