Skip to content

\overline and subscripts/superscripts in mathtext #5444

Closed
@breedlun

Description

@breedlun

The following code works fine in matplotlib 1.4.3, but it fails in matplotlib 1.5.0.

import matplotlib.pyplot as plt
ax = plt.subplot(111)
ax.plot([0,1],[0,1])
ax.text(0.5, 0.5, r'$\overline{\omega}$')
ax.text(0.5, 0.6, r'$\overline{\omega}^x$')
ax.text(0.5, 0.4, r'$\overline{\omega}_x$')

The traceback is super long, but here is the last line.

File "/Users/Ben/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/matplotlib/mathtext.py", line 2809, in subsuper
  last_char.width = last_char._metrics.advance
AttributeError: 'Vlist' object has no attribute '_metrics'

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions