MyST-NB
MyST-NB copied to clipboard
myst-nb does not honnor the pyplot "off" interactive mode
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:
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()