proplot-dev / proplot

🎨 A succinct matplotlib wrapper for making beautiful, publication-quality graphics
https://proplot.readthedocs.io
MIT License
1.12k stars 102 forks source link

path effects not pretty #443

Open kinyatoride opened 11 months ago

kinyatoride commented 11 months ago

Description

Hi, I found that the path effects around title are sometime not as pretty as the default ones in matplotlib. I really like this feature in proplot so it would be nice if we can fix this. Below, I show an example where the path effect shows a weird behavior.

Steps to reproduce

import proplot as pplt
import matplotlib.patheffects as path_effects

pplt.rc.update(fontsize=16, titleborderwidth=4)

fig, ax = pplt.subplots()
ax.set_facecolor('gray')

ax.format(ultitle='MW')

text = ax.text(0.5, 0.5, 'MW')
text.set_path_effects([path_effects.Stroke(linewidth=4, foreground='white'),
                       path_effects.Normal()])

output

Proplot version

3.4.3 0.9.7