Python Matplotlib hangs when asked to plot a second chart (after closing first chart window)

后端 未结 6 1088
不知归路
不知归路 2021-02-14 18:09

Weird behaviour, I\'m sure it\'s me screwing up, but I\'d like to get to the bottom of what\'s happening:

I am running the following code to create a very simple graph

6条回答
  •  名媛妹妹
    2021-02-14 18:43

    Have you tried to use ipython instead of the standard python interpreter?

    You can install ipython with the following command:

    easy_install ipython
    

    and then, ipython has a specific mode to be ran with pylab, called -pylab:

    ipython -pylab
    
    In[1]: ...
    

    I think that most of the people use this solution to plot graphs with python, it is a command line similar to the one of R/Matlab, completition, etc... and it runs a separated thread for every plot so it shouldn't have the problem you have described.

提交回复
热议问题