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 initializationcode 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.
The text was updated successfully, but these errors were encountered:
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.
richardsheridan commentedMay 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.
The text was updated successfully, but these errors were encountered: