New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Matplotlib 2 is extremely slow after plt.show()
#8129
Comments
What operating system, and what matplotlib backend? That's a very old IPython version; can you try with a recent version? |
which version of matplotlib were you using before? In v1.5.x, there were
some updates to the ipython hooks. Furthermore, that version of ipython is
actually quite old. I think they are on version 5.x now.
I don't think we define a minimum version where we'd expect ipython to work
with matplotlib. Perhaps we should.
…On Wed, Feb 22, 2017 at 1:26 PM, tomchor ***@***.***> wrote:
Bug report
I recently upgraded to matplotlib 2.0.0 and it has this weird behavior in
the interactive window where after I do a plt.show and close the
interactive window, it hangs and I can't type anything. I can only type if
I press control+c, but even so it takes about 15 seconds before the
KeyboardInterrupt sets in and then I can type.
The behavior can be reproduced simple with this code
from matplotlib import pyplot as plt
plt.plot(range(10))
plt.show()
Apparently this only happens with IPython, since I tried in a simple
python session and there was no problem. But I think it's not
IPython-related because this never happened with any of the previous
Matplotlib versions, just version 2. So I thought I'd post this here
instead on the IPython issues.
Matplotlib version 2.0.0
Python version 2.7.12
IPython version 2.4.1
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#8129>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AARy-F2knxIEIpzJ1fWWHnHG_IMzvcubks5rfH2_gaJpZM4MJAyc>
.
|
Sorry, I forgot that information. Just updated the issue. EDIT: Just installed IPython 5.2.2 and the issue completely went away. I never noticed my IPython version was slow, so I never bothered to update it. Apparently matplotlib doesn't work well with old versions of IPython. Although I never read that anywhere. Maybe there should be some note about that somewhere. Thanks |
It smells like Tk is not giving up control of the process? I can confirm that closing the window does not exit (conda has old enough versions of everything!). This is specific to Tk (qt4 works as expected).
|
I'm having this issue too with Tkagg. After OS: Gentoo Linux amd64 |
att @Carreau I suspect that there may be some input hook issues with tk.... |
I don't know if it helps, but this issue is not on matplotlib 1.5.1. |
That makes it more likely to be a bug in the IPython tk inputhook. One of the changes is 1.5.3 is to automatically enable that if Matplotlib detects it has been imported inside of a IPython sessions (but 1.5.1 did not). |
One of the possibility is to test with IPython 6 (released yesterday, Python 3 only) anduse https://github.com/ipython/rlipython as it we re-us readline and should skip the PTK eventloop. It should be backported to 5.4 but this has not been released yet. I'm unfamiliar with Tk hooks, I'll see if I find time and manage to reproduce |
Hello! I still have this issue in 2.1.0-r1. I tried with IPython 6 and rlipython as suggested, but still the terminal hangs after closing the figure. Is there any possible workaround (so I don't stay trapped in 1.5.1 :) )? Thanks :D |
tomchor commentedFeb 22, 2017
•
edited
I recently upgraded to
matplotlib 2.0.0
and it has this weird behavior in the interactive window where after I do aplt.show
and close the interactive window, it hangs and I can't type anything. I can only type if I press control+c, but even so it takes about 15 seconds before theKeyboardInterrupt
sets in and then I can type.The behavior can be reproduced simple with this code
Apparently this only happens with IPython, since I tried in a simple python session and there was no problem. But I think it's not IPython-related because this never happened with any of the previous Matplotlib versions, just version 2. So I thought I'd post this here instead on the IPython issues.
Matplotlib version 2.0.0
Python version 2.7.12
IPython version 2.4.1
Linux Mint 18.1
get_backend()
output:'TkAgg'
The text was updated successfully, but these errors were encountered: