I have a pyQt application with several embedded matplotlib widgets (https://github.com/chipmuenk/pyFDA).
The automatic updating of plots can be turned off for each plotting widget to speed up the application (especially 3D plots can take quite long).
Unfortunately, I haven't managed to disable (grey out) the canvas completely yet. What I'd like is to do something like
class MplWidget(QWidget):
"""
Construct a subwidget with Matplotlib canvas and NavigationToolbar
"""
def __init__(self, parent):
super(MplWidget, self).__init__(parent)
# Create the mpl figure and construct the canvas with the figure
self.fig = Figure()
self.pltCanv = FigureCanvas(self.fig)
#-------------------------------------------------
self.mplwidget = MplWidget(self)
self.mplwidget.pltCanv.setEnabled(False) # <- this doesn't work
to make it clear that there is nothing to interact with in this widget. Is there an easy workaround?

clf()) - not too pretty, but it also does the job. If you repost the patch solution as an answer, I could give you a credit.matplotlib.widgets.Widget.set_active(active), which probably corresponds to disabling a widget. Note, though, thatset_activefor Radio and CheckButtons has different meaning!