Skip to content
  • Sponsor matplotlib/matplotlib

  • Notifications You must be signed in to change notification settings
  • Fork 7.9k

[MNT]: Should set_size_inches be updated to use device_pixel_ratio? #21090

Closed
@anntzer

Description

@anntzer

Summary

set_size_inches currently uses

dpi_ratio = getattr(canvas, '_dpi_ratio', 1)

I haven't actually tried, but I wonder if that was missed in #19126, and should be changed to canvas.device_pixel_ratio?

(Likewise, backend_macosx.py would likely need to be updated in the same manner?)

Proposed fix

No response

Activity

QuLogic

QuLogic commented on Sep 28, 2021

@QuLogic
Member

It does appear to be wrong. The figure is double-sized for what was requested, if you pull it from a hidpi back to regular screen.

added 4 commits that reference this issue on Sep 28, 2021
7267d23
a0a1294
38691d7
9dc00b4
added 3 commits that reference this issue on Oct 15, 2021
4635702
56fe546
9869826
added this to the v3.5.0 milestone on Oct 20, 2021
added a commit that references this issue on Jan 23, 2023
ba2c930
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      [MNT]: Should set_size_inches be updated to use device_pixel_ratio? · Issue #21090 · matplotlib/matplotlib