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 3c5cbd8

Browse filesBrowse files
committed
Adding comment on scaling of coords.
1 parent 7db54c0 commit 3c5cbd8
Copy full SHA for 3c5cbd8

File tree

Expand file treeCollapse file tree

1 file changed

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

1 file changed

+2
-0
lines changed

‎lib/matplotlib/backends/backend_qt5agg.py

Copy file name to clipboardExpand all lines: lib/matplotlib/backends/backend_qt5agg.py
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ def paintEvent(self, event):
4141
# See documentation of QRect: bottom() and right() are off by 1, so use
4242
# left() + width() and top() + height().
4343
rect = event.rect()
44+
# scale rect dimensions using the screen dpi ratio to get
45+
# correct values for the Figure coordinates (rather than QT5's coords)
4446
width = rect.width() * self._dpi_ratio
4547
height = rect.height() * self._dpi_ratio
4648
left, top = self.mouseEventCoords(rect.topLeft())

0 commit comments

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