As a result of #1125 we now get two tk windows from the following code:
import matplotlib.pyplot as plt
I have commented where (and potentially how) I think the problem should be resolved.
Marked as 1.2 release critical - we probably don't want 1.2 going out of the door without fixing this.
@dmcdougall should probably have some visibility of this issue.
Hmmmmmm. Pants. I'll look into it this evening. I reckon a simple:
canvas = None
canvas = self._canvas_setup()
should work, unless I'm missing something.
I don't think so. I'm not working in interactive mode here (unless I've missed the meaning of matplotlib.is_interactive).
@dmcdougall : To completely abuse its original meaning, I quote Martin Luther King, Jr. :
All progress is precarious, and the solution of one problem brings us
face to face with another problem.
Ok. I suppose the question I'm trying to answer is, "How do I determine whether an interactive backend is currently loaded?"
Edit: Assuming, of course, that this behaviour also occurs with the GTK and Qt backends...
I don't see the double window behaviour with either the qt4agg backend or the macosx backend. @pelson do you see this with either of these backends?
@verbit Line 508 of lib/matplotlib/backends/backend_tkagg is
FigureCanvas = FigureCanvasTkAgg
so the return value of pylab_setup does indeed have a FigureCanvas for this backend. Do you see this behaviour with qt4agg or gtkagg?
Perhaps this is actually a bug in the tkagg backend?
@dmcdougall : I think @verbit is raising a completely different issue. I think its best we discuss this inline on the original PR rather than muddying the issue here.
Ah right, these two issues are completely separate. Sorry, the timing of each of the issues threw me.
@pelson For some reason the tk backend crashes my entire ipython session, probably just using an outdated version or something. Do you see this behaviour with any of the other interactive backends?