Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f3a2d41

Browse files
authored
Merge pull request #22454 from ianhi/webagg-toolbar
move `_toolbar_2` from webagg_core to webagg
2 parents c56edd2 + 4d552b4 commit f3a2d41

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

lib/matplotlib/backends/backend_webagg.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@ class FigureCanvasWebAgg(core.FigureCanvasWebAggCore):
5151
pass
5252

5353

54+
class FigureManagerWebAgg(core.FigureManagerWebAgg):
55+
_toolbar2_class = core.NavigationToolbar2WebAgg
56+
57+
5458
class WebAggApplication(tornado.web.Application):
5559
initialized = False
5660
started = False
@@ -299,7 +303,7 @@ def ipython_inline_display(figure):
299303
@_Backend.export
300304
class _BackendWebAgg(_Backend):
301305
FigureCanvas = FigureCanvasWebAgg
302-
FigureManager = core.FigureManagerWebAgg
306+
FigureManager = FigureManagerWebAgg
303307

304308
@staticmethod
305309
def show():

lib/matplotlib/backends/backend_webagg_core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,7 @@ def set_history_buttons(self):
453453

454454

455455
class FigureManagerWebAgg(backend_bases.FigureManagerBase):
456-
_toolbar2_class = ToolbarCls = NavigationToolbar2WebAgg
456+
ToolbarCls = NavigationToolbar2WebAgg
457457

458458
def __init__(self, canvas, num):
459459
self.web_sockets = set()

0 commit comments

Comments
 (0)