Skip to content

Appearance of non-math hyphen changes with math in text #6028

Closed
@Tillsten

Description

@Tillsten

See the following minimal example:

plt.rcParams['mathtext.fontset'] = 'stixsans' #change to cm for normal behavior

mv = u'MV$^{2+}$'
cor = u'Al-cor'
plt.text(0.5, 0.5, cor)
plt.text(0.5, 0.3, cor + mv)

In the second case the hypen is much longer than in the first. The behavior
depends on the mathtext-setting, which is surprising. Confirmed in Python 2.7 and 3.5,
also in 2.X.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions