In Spyder, plot using Matplotlib with interactive zoom, etc

前端 未结 4 1562
有刺的猬
有刺的猬 2021-01-03 23:50

I\'ve recently switched from Enthought Canopy to Anaconda and am using the Spyder IDE. I\'ve noticed that when I plot some data,

import matplotlib.pyplot as          


        
4条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-04 00:19

    Even though it's an old question, my solution to the same issue without using the GUI.

    Plot only in console:

    %matplotlib inline 
    plt.plot([1, 2, 3, 4])
    plt.ylabel('some numbers')
    

    Going back to plot outside console:

    %matplotlib qt5
    plt.plot([1, 2, 3, 4])
    plt.ylabel('some numbers')
    

    There was no need to restart my spyder or kernal. Session info:

    spyder 3.3.2
    python 3.6.8
    windows 10. 
    

提交回复
热议问题