How can I open the interactive matplotlib window in IPython notebook?

后端 未结 7 1939
臣服心动
臣服心动 2020-11-30 17:30

I am using IPython with --pylab=inline and would sometimes like to quickly switch to the interactive, zoomable matplotlib GUI for viewing plots (the one that po

7条回答
  •  一个人的身影
    2020-11-30 18:04

    According to the documentation, you should be able to switch back and forth like this:

    In [2]: %matplotlib inline 
    In [3]: plot(...)
    
    In [4]: %matplotlib qt  # wx, gtk, osx, tk, empty uses default
    In [5]: plot(...) 
    

    and that will pop up a regular plot window (a restart on the notebook may be necessary).

    I hope this helps.

提交回复
热议问题