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

myst-nb does not honnor the pyplot "off" interactive mode #644

Open
12rambau opened this issue Oct 13, 2024 · 0 comments
Open

myst-nb does not honnor the pyplot "off" interactive mode #644

12rambau opened this issue Oct 13, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@12rambau
Copy link

12rambau commented Oct 13, 2024

Describe the bug

context
In my documentation I need to specifically explain how tyo design the Figure and Axes object so I split the creation of the subplots from the other cells. To avoid to see an empty figure being display after my cell I activate the ioff mode of pyplot.

expectation
I expect the behaviour of mystnb to be consistent with the behaviour of the notebook in jupyter, collab and visual studio code i.e. to not display the empty graph as it's not yyest populated.

bug
When the doc is build the grah apears anyway:

image

Reproduce the bug

execute the following cell in Jupyter and then in a Sphinx documentation:

from matplotlib import pyplot as plt 

plt.ioff() # remove interactive for the sake of the example
fig, ax = plt.subplots()
@12rambau 12rambau added the bug Something isn't working label Oct 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant