diff --git a/lib/matplotlib/backends/backend_macosx.py b/lib/matplotlib/backends/backend_macosx.py index 073debd249df..802f6ecec5e0 100644 --- a/lib/matplotlib/backends/backend_macosx.py +++ b/lib/matplotlib/backends/backend_macosx.py @@ -216,6 +216,7 @@ class _BackendMac(_Backend): FigureCanvas = FigureCanvasMac FigureManager = FigureManagerMac + @staticmethod def trigger_manager_draw(manager): # For performance reasons, we don't want to redraw the figure after # each draw command. Instead, we mark the figure as invalid, so that it diff --git a/lib/matplotlib/backends/backend_webagg.py b/lib/matplotlib/backends/backend_webagg.py index 33353dbda68f..6d471977ba81 100644 --- a/lib/matplotlib/backends/backend_webagg.py +++ b/lib/matplotlib/backends/backend_webagg.py @@ -108,8 +108,7 @@ def get(self): "all_figures.html", prefix=self.url_prefix, ws_uri=ws_uri, - figures=sorted( - list(Gcf.figs.items()), key=lambda item: item[0]), + figures=sorted(Gcf.figs.items()), toolitems=core.NavigationToolbar2WebAgg.toolitems) class MplJs(tornado.web.RequestHandler): @@ -326,7 +325,7 @@ def ipython_inline_display(figure): @_Backend.export class _BackendWebAgg(_Backend): FigureCanvas = FigureCanvasWebAgg - FigureManager = FigureManagerWebAgg + FigureManager = core.FigureManagerWebAgg @staticmethod def trigger_manager_draw(manager):