问题
Is there a way to have the plots created inside Jupyter Notebook using matplotlib to appear on a separate pop-up screen that would allow you to expand/shrink the image by hand? I've tried experimenting with (%matplotlib notebook) but that didn't really do the trick.
Just wondering if this is possible.
回答1:
Just use an interactive backend. This works for me:
import matplotlib.pyplot as plt
%matplotlib tk
plt.plot([1, 2])
The notebook (nbagg) backend also allows for expand/shrink by hand. It has some rough edges though.
回答2:
the tkinter backend is a bit buggy (windows 10, python 3)
I used %matplotlib qt for the matplotlib plot that we are all used to
:)
来源:https://stackoverflow.com/questions/41046299/pop-up-plots-using-python-jupyter-notebook