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 db5b330

Browse filesBrowse files
authored
Merge pull request #19382 from meeseeksmachine/auto-backport-of-pr-19052-on-v3.3.x
Backport PR #19052 on branch v3.3.x (Always pass integers to wx.Size.)
2 parents d262e53 + 491c957 commit db5b330
Copy full SHA for db5b330

File tree

Expand file treeCollapse file tree

1 file changed

+4
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-2
lines changed

‎lib/matplotlib/backends/backend_wx.py

Copy file name to clipboardExpand all lines: lib/matplotlib/backends/backend_wx.py
+4-2Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -922,7 +922,8 @@ def __init__(self, num, fig):
922922
_set_frame_icon(self)
923923

924924
self.canvas = self.get_canvas(fig)
925-
self.canvas.SetInitialSize(wx.Size(fig.bbox.width, fig.bbox.height))
925+
w, h = map(math.ceil, fig.bbox.size)
926+
self.canvas.SetInitialSize(wx.Size(w, h))
926927
self.canvas.SetFocus()
927928
self.sizer = wx.BoxSizer(wx.VERTICAL)
928929
self.sizer.Add(self.canvas, 1, wx.TOP | wx.LEFT | wx.EXPAND)
@@ -1070,7 +1071,8 @@ def set_window_title(self, title):
10701071

10711072
def resize(self, width, height):
10721073
# docstring inherited
1073-
self.canvas.SetInitialSize(wx.Size(width, height))
1074+
self.canvas.SetInitialSize(
1075+
wx.Size(math.ceil(width), math.ceil(height)))
10741076
self.window.GetSizer().Fit(self.window)
10751077

10761078

0 commit comments

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