Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Interrupting certain matplotlib operations leaves the inline backend 'wedged' #992
This is something I've only noticed on the notebook, though it likely also occurs with the qt console. If I interrupt a matplotlib rendering operation, quite often it becomes impossilbe to get any further plots to show up. Somewhere, we're holding state that isn't fully restored if the rendering operation is interrupted by the user.
I've had this bite me often enough lately to realize it will be a major usability headache for new users of the notebook, which is why I'm making it critical. I suspect it will be easy to fix once we have a look at our inline pylab code.
It turns out, this isn't in my changes at all, it's the fact that post-execute functions are unregistered on any exception (including KeyboardInterrupt). This is indeed easily fixed. There are two obvious options:
I think 1. makes more sense, and is trivially fixed. I'll do a PR with this in a minute, adding some cleanup in the backend to make sure that the state is cleared, even if