I found that in a fresh Jupyter kernel, the following snippet prevents further figures to be rendered:
# cell 1importmatplotlib.pyplotaspltfrommatplotlib.datesimportDateFormatterwithplt.style.context('seaborn'):
fig, ax=plt.subplots(figsize=(5, 5))
ax.xaxis.set_major_formatter(DateFormatter("%H:%M"))This figure ("cell 1") is rendered, but new figures are not rendered any more in a notebook:
# cell 2fig, ax=plt.subplots(figsize=(5, 5)) # not rendered
The issue does not appear in any of the following case:
- "cell 2" is run before "cell 1": all following figures are then properly rendered
- The
%matplotlib inline instruction is explicitly added, before or after "cell 1" - The context manager is not used (but it fails with any stylesheet)
- The
DateFormatter is not applied
I found that in a fresh Jupyter kernel, the following snippet prevents further figures to be rendered:
This figure ("cell 1") is rendered, but new figures are not rendered any more in a notebook:
The issue does not appear in any of the following case:
%matplotlib inlineinstruction is explicitly added, before or after "cell 1"DateFormatteris not applied