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 2fe9e32

Browse filesBrowse files
committed
Merge pull request #5112 from Tillsten/patch-1
OffsetImage: use dpi_cor in get_extent
1 parent e4a7c01 commit 2fe9e32
Copy full SHA for 2fe9e32

File tree

Expand file treeCollapse file tree

1 file changed

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

1 file changed

+1
-3
lines changed

‎lib/matplotlib/offsetbox.py

Copy file name to clipboardExpand all lines: lib/matplotlib/offsetbox.py
+1-3Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1334,8 +1334,6 @@ def get_window_extent(self, renderer):
13341334
return mtransforms.Bbox.from_bounds(ox - xd, oy - yd, w, h)
13351335

13361336
def get_extent(self, renderer):
1337-
1338-
# FIXME dpi_cor is never used
13391337
if self._dpi_cor: # True, do correction
13401338
dpi_cor = renderer.points_to_pixels(1.)
13411339
else:
@@ -1344,7 +1342,7 @@ def get_extent(self, renderer):
13441342
zoom = self.get_zoom()
13451343
data = self.get_data()
13461344
ny, nx = data.shape[:2]
1347-
w, h = nx * zoom, ny * zoom
1345+
w, h = dpi_cor * nx * zoom, dpi_cor * ny * zoom
13481346

13491347
return w, h, 0, 0
13501348

0 commit comments

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