I’ve got a series of subplots in a matplotlib.FigureCanvas instance which is embedded in a gtk viewport. Everything seems to work correctly when I start the application - i.e. the series of subplots are displayed. But, I need to be able to interactively change the axis settings by clicking on GTK buttons. I have not yet figured out how to make the subplots redraw after changing the axis settings.
Based on the dynamic_image_gtkagg.py example, I have done the following (code not complete here):
f = Figure(figsize=(5,4), dpi=100) canvas = FigureCanvas(f) manager = pylab.get_current_fig_manager()
and later, when I need to redraw the subplots:
But, although I have confirmed that the axis settings are changed, the subplots are not redrawn using the new settings.
Any hints would be greatly appreciated.