Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 249f19e

Browse files
committed
Remove hardcoding
1 parent 5156948 commit 249f19e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/matplotlib/backends/backend_webagg_core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ def handle_refresh(self, event):
346346

347347
def handle_resize(self, event):
348348
x, y = event.get('width', 800), event.get('height', 800)
349-
x, y = int(x) * 2, int(y) * 2
349+
x, y = int(x) * self._dpi_ratio, int(y) * self._dpi_ratio
350350
fig = self.figure
351351
# An attempt at approximating the figure size in pixels.
352352
fig.set_size_inches(x / fig.dpi, y / fig.dpi)

0 commit comments

Comments
 (0)