Incorrect latex rendering for \hat{x} and \vec{x}

Hi:

I am getting incorrect renderings when using \hat{x} or \vec{x}. The
following code

hat_error.png

···

#####################################################
import matplotlib.pylab as plt

plt.axes([0.1, 0.15, 0.8, 0.75])
plt.plot(range(10))

plt.xlabel(r'$\hat{y}$ $\vec{x}$ $x^2 + y^2$', fontsize=20)
plt.show()
#####################################################

produce the attached plot. Note that the "hat" and the "arrow" are in
the wrong place. The other Latex part looks OK.

I am running version 1.2.x (built from commit
11e528425e230a3e23d04202aea23d88d40d9c4c) and Ubuntu 11.10.

Any ideas about how to solve the problem?

Alejandro.

Hi

Latex rendering looks OK here.

In [9]: matplotlib.__version__
Out[9]: '1.0.0'

However, synaptic tells me: 1.0.1-rc1-1ubuntu5.
System Ubuntu 10.10 with ppa
(Index of /bgamari/matplotlib-unofficial/ubuntu) for
matplotlib 1.0.1.

Best,
Peter

···

Am 07.12.2011 23:06, schrieb Alejandro Weinstein:

Hi:

I am getting incorrect renderings when using \hat{x} or \vec{x}. The
following code

#####################################################
import matplotlib.pylab as plt

plt.axes([0.1, 0.15, 0.8, 0.75])
plt.plot(range(10))

plt.xlabel(r'\\hat\{y\} \\vec\{x\} x^2 \+ y^2', fontsize=20)
plt.show()
#####################################################

produce the attached plot. Note that the "hat" and the "arrow" are in
the wrong place. The other Latex part looks OK.

I am running version 1.2.x (built from commit
11e528425e230a3e23d04202aea23d88d40d9c4c) and Ubuntu 11.10.

Any ideas about how to solve the problem?

Alejandro.

Just updated to the last version from github, and now works OK.

···

On Wed, Dec 14, 2011 at 10:20 AM, Peter Liebetraut <peter.liebetraut@...3893...> wrote:

Hi

Latex rendering looks OK here.

In [9]: matplotlib.__version__
Out[9]: '1.0.0'