Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit d07e36d

Browse filesBrowse files
authored
Merge pull request #14732 from anntzer/wxconfsubplottoolmanager
Deduplicate wx configure_subplots tool.
2 parents 0d6fd56 + 4fbc21e commit d07e36d
Copy full SHA for d07e36d

File tree

Expand file treeCollapse file tree

2 files changed

+11
-3
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+11
-3
lines changed
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Deprecations
2+
````````````
3+
4+
``backend_wx.ConfigureSubplotsWx.configure_subplots`` and
5+
``backend_wx.ConfigureSubplotsWx.get_canvas`` are deprecated.

‎lib/matplotlib/backends/backend_wx.py

Copy file name to clipboardExpand all lines: lib/matplotlib/backends/backend_wx.py
+6-3Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1406,13 +1406,13 @@ def pan(self, *args):
14061406
self.ToggleTool(self.wx_ids['Zoom'], False)
14071407
NavigationToolbar2.pan(self, *args)
14081408

1409-
def configure_subplots(self, evt):
1409+
def configure_subplots(self, *args):
14101410
global FigureManager # placates pyflakes: created by @_Backend.export
14111411
frame = wx.Frame(None, -1, "Configure subplots")
14121412
_set_frame_icon(frame)
14131413

14141414
toolfig = Figure((6, 3))
1415-
canvas = self.get_canvas(frame, toolfig)
1415+
canvas = type(self.canvas)(frame, -1, toolfig)
14161416

14171417
# Create a figure manager to manage things
14181418
FigureManager(canvas, 1, frame)
@@ -1653,8 +1653,10 @@ def set_message(self, s):
16531653

16541654
class ConfigureSubplotsWx(backend_tools.ConfigureSubplotsBase):
16551655
def trigger(self, *args):
1656-
self.configure_subplots()
1656+
NavigationToolbar2Wx.configure_subplots(
1657+
self._make_classic_style_pseudo_toolbar())
16571658

1659+
@cbook.deprecated("3.2")
16581660
def configure_subplots(self):
16591661
frame = wx.Frame(None, -1, "Configure subplots")
16601662
_set_frame_icon(frame)
@@ -1671,6 +1673,7 @@ def configure_subplots(self):
16711673
SubplotTool(self.canvas.figure, toolfig)
16721674
frame.Show()
16731675

1676+
@cbook.deprecated("3.2")
16741677
def get_canvas(self, frame, fig):
16751678
return type(self.canvas)(frame, -1, fig)
16761679

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.