Open
Description
Bug summary
When rendering a plot on Wayland with fractional scaling turned on (e.g., 150%), the resulting plot content looks bad (i.e., jagged edges in lines and text). The UI is fine though (i.e., the toolbar looks nice and sharp).
Code for reproduction
import matplotlib
matplotlib.use("qtagg")
import matplotlib.pyplot as plt
plt.plot([1, 10, -3, 17, 0, -6, 2, 12, 18, -3])
plt.show()
Actual outcome
Expected outcome
I would expect the plot to render nicely.
Additional information
Maybe there is something wrong with detecting the actual DPI when fractional scaling is enabled? I also noticed that when creating the figure with 100% and then switching to 150% scaling in my desktop environment (I'm using GNOME), the figure remains sharp (i.e., plot elements are anti-aliased). It's only when I create the figure from 150% scaling that it is jagged. (I use a 4K screen with 150% fractional scaling.)
Operating system
Arch Linux
Matplotlib Version
3.10.3
Matplotlib Backend
qtagg
Python version
3.13.5
Jupyter version
No response
Installation
None
Metadata
Metadata
Assignees
Labels
No labels