Spyder / Jupyter plots in separate window
IPython console in Spyder IDE by default opens non-interactive Matplotlib plots in the same inline “notebook”. Fix this by creating separate windows for interactive figures in Spyder:
Tools → Preferences → Ipython Console → Graphics → Graphics Backend → Backend: “automatic”
Interactive figures are more useful in general to probe the figure data and zoom/pan the figure, unlike the static PNGs in the inline notebook.
Jupyter notebooks can also have interactive plots. Instead of static inline notebook plots with
%matplotlib inline
for inline interactive plots in Jupyter:
%matplotlib notebook
Example:
%matplotlib notebook
from matplotlib.pyplot import figure
ax = figure().gca()
ax.plot(range(5))
References: