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
[Bug]: Minus sign subscript in legend disappears in math mode for font sizes larger than 25 + part of legend symbol does not show for large fonts #21693
There are two problems here. They might be related so I put them both in the bug report.
1: I want to write $\sigma_{-}^{asdf}$ with asdf as superscript and - as subscript in the legend. When I use font size larger than 25, i.e. from 26 and upwards, the - sign disappears.
2: Also, when I write $\sigma_{-}$ the lowest part of the \sigma symbol does not show in the legend for font sizes larger than 23, i.e. from 24 and upwards.
Code for reproduction
importmatplotlib.pyplotaspltplt.rc('font', size=26) # set font size in plotsfig, ax=plt.subplots(figsize=(12, 12))
x= [1,2,3,4]
y= [1,2,3,4]
ax.plot(x, y, label=r'$\sigma^{asdf}$')
ax.plot(x, y, label=r'$\sigma_{-}$')
ax.plot(x, y, label=r'$\sigma_{-}^{asdf}$')
ax.plot(x, y, label=r'$\sigma_{+}^{asdf}$')
ax.legend()
plt.show()
Actual outcome
Expected outcome
Both superscript and - subscript shows for larger font sizes (up to a sensible value).
Entire math symbol shows for larger font sizes (up to a sensible value).