Skip to content

Commit fc0e08c

Browse files
authored
Merge pull request #428 from ianhi/toolbar
fix toolbar for mpl>3.6
2 parents 5abd20f + b43c5df commit fc0e08c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ipympl/backend_nbagg.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -452,11 +452,13 @@ def handle_key(key):
452452

453453

454454
class FigureManager(FigureManagerWebAgg):
455-
ToolbarCls = Toolbar
455+
if matplotlib.__version__ < "3.6":
456+
ToolbarCls = Toolbar
456457

457458
def __init__(self, canvas, num):
458459
FigureManagerWebAgg.__init__(self, canvas, num)
459460
self.web_sockets = [self.canvas]
461+
self.toolbar = Toolbar(self.canvas)
460462

461463
def show(self):
462464
if self.canvas._closed:

0 commit comments

Comments
 (0)