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
{{ message }}
Repository navigation
[Bug]: ax.text() box size determined incorrectly for *-subscript (cuts off text at bottom) #31481
I have the case that I want to add some texual data to a plot. Therefore I need an subscript index for my math-symbol, which became *. It turned out that the text-box cuts off the bottom of the text when just givin * as subscript.
I have created a sample code below which shows the following behaviour:
I tried to overcome that issue by adding a protected space (~) behind * r"$\pm \sigma_{*~}$" but the space is ignored with respect to the box-calculation.
Upgraded all packages before issue with pip freeze | %{$_.split('==')[0]} | %{pip install --upgrade $_}
Note: I tested rcparam useTeX=True which worked. However, by that the font changed to the TeX-font. If I consider now using the usetex option means I have to re-finetune the optic a ton of plots.
IDE: VS-Code 1.114.0 (system setup)
VS-Code Plugins: Microsoft Python Plugins Version 2026.4.0
changed the title [-][Bug]: ax.text() box size determined incorrectly for *-subscript (cuts of text at bottom)[/-][+][Bug]: ax.text() box size determined incorrectly for *-subscript (cuts off text at bottom)[/+]on Apr 9, 2026
Activity
[-][Bug]: ax.text() box size determined incorrectly for *-subscript (cuts of text at bottom)[/-][+][Bug]: ax.text() box size determined incorrectly for *-subscript (cuts off text at bottom)[/+]rcomer commentedon Apr 9, 2026
A workaround is to use the
\ast(asterisk) commandQuLogic commentedon Apr 10, 2026
This looks like #15313, which was fixed by #30059, and should be fixed in 3.11.
Dephrilibrium commentedon Apr 10, 2026
Thanks for the workaroud🙏. It works perfectly. Actually it's quite obvious, but I havent thought so far.
Best regards,
Deph