_display_new_figures
Signature
_display_new_figures(existing_nums: set[int]) -> None
What problem it solves
Explicitly shows in IPython/Jupyter the figures created after a given initial snapshot, preventing them from staying hidden inside a style context manager.
Input contract
existing_numsmust contain the figure numbers present before entering the monitored block.The function compares this set with
plt.get_fignums()to identify only the new figures.If
IPython.displayis not available, the function does nothing.
Where it is used
in
_style_contextwhen execution happens inside an IPython/Jupyter notebook
How it fails
In normal use it does not raise package-specific exceptions.
If display support is not available, the function behaves as a no-op.
Why it remains private
It is only meant to refine mespy’s notebook integration: it does not represent an autonomous operation that is useful to end users.