FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Scaling issues with PyQt5 when using mixed resolution displays · Issue #8061 · matplotlib/matplotlib · GitHub

Repository navigation

Scaling issues with PyQt5 when using mixed resolution displays #8061

Description

I have a set-up where I have a retina MBP (bottom) plugged in to a non-retina display (top).

Normally Matplotlib looks fine on retina or non-retina displays when used separately, but in the case of mixed resolutions, the fonts and the elements of the figure appear too large on the non-retina display. The following image sequence shows a matplotlib window that was created on the retina display and is then moved to the non-retina display. The same issue happens if I create the figure in the non-retina display to start with, so this is not about moving from one to the other.




I then click in the bottom right to resize the window:

Activity

  1. tacaswell commented on Feb 10, 2017

    Member

    Does Qt provide a signal we can hook into when the window changes screens (and hence the dpi scaling)?

  2. added this to the milestone on Feb 10, 2017
  3. astrofrog commented on Feb 10, 2017

    ContributorAuthor

    Looks like the easiest way is to look for screenChanged then in there check if devicePixelRatio changes:

    https://forum.qt.io/topic/52296/detect-changing-devicepixelratio/4

  4. astrofrog commented on May 5, 2017

    ContributorAuthor

    Note that this also causes issues when just showing a plot on the lower-res screen that is attached to a retina screen laptop (the fonts are two times too large and lines two times too thick) - that is, without even changing screen. I think this is something to do with the fact that the DPI device ratio is declared to be 1 for the low-res screen. If I force _dpi_ratio to return 2 then the scaling looks correct on the low-res screen (but the mouse events are then wrong...). Can people test what the behavior is like on other OSes with mixed-resolution screens?

  5. astrofrog commented on May 5, 2017

    ContributorAuthor

    @QuLogic - do you have any ideas since you've worked on the DPI ratio stuff before?

  6. tacaswell commented on May 7, 2017

    Member

    @astrofrog can you check with v2.0.1?

  7. modified the milestones: , on May 7, 2017
  8. astrofrog commented on May 8, 2017

    ContributorAuthor

    @tacaswell - this is still an issue with 2.0.1 unfortunately

  9. efiring commented on May 8, 2017

    Member

    It looks like you identified at least part of the machinery we need to add (screenChanged, etc.); any chance you can have a go at implementing it?

  10. modified the milestones: , on May 12, 2017
  11. astrofrog commented on Jul 24, 2017

    ContributorAuthor

    All right, I'm going to take a look at this today. This has been bugging me for a while. Wish me luck.

  12. burnpanck commented on Aug 18, 2017

    This bug report here describes two problems:

    1. The figure did not properly get notified on a DPI change
    2. The figure is rendered with incorrect DPI settings on the low-DPI monitor if a hi-DPI monitor is available on the system as-well.

    #8931 only fixes the first of the two issues. Should this bug report be reopened or a separate one be created?

  13. tacaswell commented on Aug 18, 2017

    Member

    @burnpanck Can you make a new issue for the second?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL