Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ENH]: Allow interaction with HiDPI via FigureCanvas #22978

Open
richardsheridan opened this issue May 4, 2022 · 1 comment
Open

[ENH]: Allow interaction with HiDPI via FigureCanvas #22978

richardsheridan opened this issue May 4, 2022 · 1 comment

Comments

@richardsheridan
Copy link
Contributor

richardsheridan commented May 4, 2022

Problem

HiDPI stuff never worked in my app because I am using Matplotlib in an embedded style in a larger tkinter picture, directly using Figure and FigureCanvas objects rather than e.g. the pyplot interface. So I don't use a figure manager at all in that thing, but the HiDPI logic is wrapped up in there.

It does make sense for pyplot to control the DPI state from a FigureManager, but I think having everything in there limits the broader usability.

Proposed solution

The initialization code in FigureManagerTk might be better exposed as a method (or methods) on FigureCanvasTk, or something backend-specific that is a user-facing API.

I just thought of this and so I'm still a little uncertain how best to expose this stuff, especially considering that parts of it need to be activated before the process ever draws a window. Happy to have a discussion with anyone to iron out the details.

@QuLogic
Copy link
Member

QuLogic commented May 5, 2022

I am working on moving HiDPI down into the renderer as it causes issues for tight layout when it's so high up the stack. I'm not sure yet how much of that will be exposed at the canvas or figure manager level after that.

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

No branches or pull requests

2 participants