You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When writing figure resizing code to set subplot sizes, HiDPI screens can mess things up if the physical to logical pixel ratio is not accounted for. On the Qt5 backend, there is fig.canvas. _dpi_ratio and on MacOSX there is fig.canvas._device_scale that expose the physical to logical pixel ratio. This leads to code like this:
I propose adding a dpi_ratio or similar property to fig.canvas or perhaps directly fig. For most backends it would just be 1. but Qt5Agg and MacOSX canvases could give their actual values.
Thoughts? I can take a stab at this if it seems worthwhile. Pointers as to the preferred name and whether it should live at the fig or fig.canvas level welcome.
The text was updated successfully, but these errors were encountered:
When writing figure resizing code to set subplot sizes, HiDPI screens can mess things up if the physical to logical pixel ratio is not accounted for. On the Qt5 backend, there is
fig.canvas. _dpi_ratio
and on MacOSX there isfig.canvas._device_scale
that expose the physical to logical pixel ratio. This leads to code like this:I propose adding a
dpi_ratio
or similar property tofig.canvas
or perhaps directlyfig
. For most backends it would just be1.
but Qt5Agg and MacOSX canvases could give their actual values.Thoughts? I can take a stab at this if it seems worthwhile. Pointers as to the preferred name and whether it should live at the
fig
orfig.canvas
level welcome.The text was updated successfully, but these errors were encountered: