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

Skip to content

Commit 9c603cc

Browse files
authored
Merge pull request #22750 from QuLogic/auto-backport-of-pr-22743-on-v3.5.x
Backport PR #22743: Fix configure_subplots with tool manager
2 parents 6bbedd4 + d65532f commit 9c603cc

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

lib/matplotlib/backends/_backend_gtk.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,7 @@ def _get_canvas(self, fig):
156156
return self.canvas.__class__(fig)
157157

158158
def trigger(self, *args):
159-
_NavigationToolbar2GTK.configure_subplots(
160-
self._make_classic_style_pseudo_toolbar(), None)
159+
_NavigationToolbar2GTK.configure_subplots(self, None)
161160

162161

163162
class _BackendGTK(_Backend):

lib/matplotlib/backends/backend_qt.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -995,9 +995,12 @@ def set_message(self, s):
995995

996996

997997
class ConfigureSubplotsQt(backend_tools.ConfigureSubplotsBase):
998+
def __init__(self, *args, **kwargs):
999+
super().__init__(*args, **kwargs)
1000+
self._subplot_dialog = None
1001+
9981002
def trigger(self, *args):
999-
NavigationToolbar2QT.configure_subplots(
1000-
self._make_classic_style_pseudo_toolbar())
1003+
NavigationToolbar2QT.configure_subplots(self)
10011004

10021005

10031006
class SaveFigureQt(backend_tools.SaveFigureBase):

lib/matplotlib/backends/backend_wx.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1294,8 +1294,7 @@ def set_message(self, s):
12941294

12951295
class ConfigureSubplotsWx(backend_tools.ConfigureSubplotsBase):
12961296
def trigger(self, *args):
1297-
NavigationToolbar2Wx.configure_subplots(
1298-
self._make_classic_style_pseudo_toolbar())
1297+
NavigationToolbar2Wx.configure_subplots(self)
12991298

13001299

13011300
class SaveFigureWx(backend_tools.SaveFigureBase):

0 commit comments

Comments
 (0)