pop-up plots using Python Jupyter Notebook

邮差的信 提交于 2020-03-18 12:26:14

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!