Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Hyphen as a subscript doesn't appear at certain font sizes #4428

Closed
@jhpalmieri

Description

@jhpalmieri

If I add text "$A_-$" to try to print an A with a hyphen as a subscript, some of the time that subscript does not show up. With only this text, it seems to appear if the font size is less than 20, but not if the font size is 20 or larger. It appears if there is more text with another subscript, maybe? I'm not sure what triggers it. Could the subscript be getting clipped off of the bottom?

Here is an example:

import matplotlib.pyplot as plt
fig = plt.figure()
ax = fig.add_subplot(111)
ax.axis([0, 6, 0, 6])
ax.text(1, 1, '$A_-$', fontsize=19) # subscript visible
ax.text(1, 2, '$A_-$', fontsize=20) # no subscript
ax.text(1, 3, '$A_-B$', fontsize=20) # no subscript
ax.text(1, 4, '$A_-B_+$', fontsize=20) # subscript visible

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions