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
[Bug | Regression]: dpi of plot linked to screen scaling - plots expand off the screen #21994
Comments
ah. Possible duplicate of #21875 |
I'm not sure if there's a bug here. If you are embedding in a Tk window, you should not use |
Roger that. Looking at how to change over now. |
Discovered that the pysimplegui demo isn't really the best way of doing things. Now following https://matplotlib.org/stable/gallery/user_interfaces/embedding_in_tk_sgskip.html as how to do it properly. see also matplotlib/matplotlib#21994
The bug persists. As far as I can tell, I've migrated my code over to the way specified in your link.
|
rowlesmr commentedDec 17, 2021
Bug summary
Plotting data, and then replotting over the same plot and toolbar results in the plot expanding in size, but only if the screen scaling (as set in the Windows display settings) is set to greater than 100%.
Code for reproduction is a MWE based on my actual program structure.
Code for reproduction
Actual outcome
Actual and expected outcomes are both shown here:
https://youtu.be/7c_Rt_BDfnM
Expected outcome
Actual and expected outcomes are both shown here:
https://youtu.be/7c_Rt_BDfnM
Additional information
If the program is made DPI aware (
ctypes.windll.shcore.SetProcessDpiAwareness(1)
, done bysg.set_options(dpi_awareness=True)
) then the bad behaviour occurs.If not, then the behaviour is not seen.
There is no issue seen at all if using 3.4.3
Operating system
Windows 10
Matplotlib Version
3.5.1
Matplotlib Backend
TKAgg
Python version
3.9.4
Jupyter version
No response
Installation
pip
The text was updated successfully, but these errors were encountered: