I haven't tried it, but my guess is the '\' character is the problem.
> pylab.xlabel('10$^3$ M$_\odot$')
Try
pylab.xlabel(r'10$^3$ M$_\odot$')
^
Add raw string marker.
or maybe
pylab.xlabel('10$^3$ M$_\\odot$')
Gary R.
Nicolas Champavert wrote:
> Hello,
>
> I have some problems when trying to save a figure with usetex=True.
> Sometimes, it is not possible to save the figure when trying to put an
> xlabel with LaTeX inside.
> It works with pylab.xlabel('M$_\odot$') but not with
> pylab.xlabel('10$^3$ M$_\odot$') (see below). Do you know why ?
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users