Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Open
Labels
Description
Bug summary
When using theStroke
path effect with a large linewidth, there are artefacts appearing here and there in the form of "wholes" in the outline.
Code for reproduction
importmatplotlib.pyplotaspltfrommatplotlibimportpatheffectsfig,ax=plt.subplots(1,1)text=ax.text(.5,.5,'-x.',color='red',ha='center',va='center',size=20)text.set_path_effects([patheffects.Stroke(linewidth=30,foreground='black'),patheffects.Normal()])fig.savefig("this_produces_artefacts.png")fig.savefig("this_is_fine.svg")
Actual outcome
Expected outcome
Additional information
The artefacts only appear when using the QtAgg backend or exporting as png. However, the output when using SVG is fine.
The artefacts only appear when the stroke linewidth becomes large enough for the outline of one letter to overlap with the outline of another.
Operating system
Arch
Matplotlib Version
3.7.1
Matplotlib Backend
QtAgg
Python version
3.10.10
Jupyter version
No response
Installation
conda