1.3 + xkcd + latex

This example shows the error on my platform - the xlabel is not rendered with
tex but instead the '$' are printed:

import numpy as np
import matplotlib.pyplot as plt

fig = fig = plt.figure()
ax = fig.add_subplot(111)
plt.plot (np.arange (10), 2*np.arange(10))
ax.set_xlabel ('$E_{s}/N_{0}$')

Michael Droettboom wrote:

The built-in mathtext support does. (I can put "xkcd()" at the top of
the mathtext_demo.py example and all is well).

It does not work when |text.usetex| is True (when using external TeX).
But in that case, it should have thrown an exception:

>Traceback (most recent call last):
   File "mathtext_demo.py", line 9, in <module>



   line 293, in xkcd
     "xkcd mode is not compatible with text.usetex = True")
RuntimeError: xkcd mode is not compatible with text.usetex = True|


On 10/18/2013 07:24 AM, Neal Becker wrote:

It appears that latex doesn't work with xkcd?

I put for example:
         self.ax.set_xlabel ('$E_s/N_0


Which go rendered with the '

  signs and not as latex

And my vertical axis was labeled as:

$\mathdefault{10^{3}}$ ...


October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
Matplotlib-users mailing list