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

Skip to content

Commit 149ee00

Browse files
Merge pull request #10428 from anntzer/wxcanvas
Fix wx canvas type injection.
2 parents f7757eb + 60a5e57 commit 149ee00

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/matplotlib/backends/backend_wx.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1227,7 +1227,7 @@ def _get_toolbar(self, statbar):
12271227
return toolbar
12281228

12291229
def get_canvas(self, fig):
1230-
return type(self.canvas)(self, -1, fig)
1230+
return FigureCanvasWx(self, -1, fig)
12311231

12321232
def get_figure_manager(self):
12331233
DEBUG_MSG("get_figure_manager()", 1, self)
@@ -1505,7 +1505,7 @@ def __init__(self, canvas):
15051505
self.retinaFix = 'wxMac' in wx.PlatformInfo
15061506

15071507
def get_canvas(self, frame, fig):
1508-
return FigureCanvasWx(frame, -1, fig)
1508+
return type(self.canvas)(frame, -1, fig)
15091509

15101510
def _init_toolbar(self):
15111511
DEBUG_MSG("_init_toolbar", 1, self)

0 commit comments

Comments
 (0)