The first call to matshow() re-enables interactive mode after it has been disabled by matplotlib.interactive(False). In a Jupyter notebook, this has the result of a figure not intended for display ...
It often happens that a plot is prepared with Matplotlib and saved as a PNG. Some time later, small edits are needed — for example: adjusting axis labels, modifying the legend, translating text into ...