I think this might be a matplotlib issue.
I've been having some refresh issues with matplotlib since
switching to 2.6. In particular I've noticed that if I put my
mouse over the toolbar and let a tooltip pop up the canvas does
not get repainted.
Up to now I'd been assuming this problem was isolated to me (I use
ratpoison as a window manager, which can confuse some apps).
I've cc'ed the matplotlib list in case anyone can throw some light
I can confirm this (mis)behaviour with matplotlib 0.80 and gtk+/pygtk 2.6. I had wanted to look into this matter, but didn't yet have time to do it. A simple guess would be that the expose-event is not handled properly by the GTK backend.
I noticed the problem when I put a menu-bar over a matplotlib GTK Canvas. When you leave an opened menu, the menu will not disappear.
I have started looking at the code and did not quite understand what I found:
backends/backend_gtk.py has a class FigureCanvasGTK. Its method 'expose_event' is responsible for redrawing.
In the situation I described, when I leave an opened menu that overlaps the graph, the expose_event is properly called, but the widget is not redrawn. If DBL_BUFFER is set (which it is), the widget is only redrawn, if self._draw_pixmap is set to True. Of course, this variable is not set to True when GTK closes a menu but only when matplotlib requests a redraw. So, in conclusion, no redraw happens.
After consulting the PyGTK reference I tried to reactivate double buffering, which is turned of in the backend_gtk.py by the command
I wonder why you set this? Do you want to provide your own double buffering? Why? If you set this value to True, everything will be fine.
On 5/31/05, *John Gill* <jng@…81… >> <mailto:jng@…81…>> wrote: