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 ed44f27

Browse filesBrowse files
committed
get proper renderer width and height in FigureImage
1 parent 4b50e49 commit ed44f27
Copy full SHA for ed44f27

File tree

Expand file treeCollapse file tree

1 file changed

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

1 file changed

+2
-1
lines changed

‎lib/matplotlib/image.py

Copy file name to clipboardExpand all lines: lib/matplotlib/image.py
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1119,7 +1119,8 @@ def get_extent(self):
11191119
def make_image(self, renderer, magnification=1.0, unsampled=False):
11201120
bbox = Bbox([[self.ox, self.oy],
11211121
[self.ox + self._A.shape[1], self.oy + self._A.shape[0]]])
1122-
clip = Bbox([[0, 0], [renderer.width, renderer.height]])
1122+
width, height = renderer.get_canvas_width_height()
1123+
clip = Bbox([[0, 0], [width, height]])
11231124
return self._make_image(
11241125
self._A, bbox, bbox, clip, magnification=magnification,
11251126
unsampled=unsampled, round_to_pixel_border=False)

0 commit comments

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