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 ?
> 


Works fine here, with and w/o raw strings.

In [75]: rcParams['text.usetex']=True

In [76]: plot([1,2,3])
Out[76]: [<matplotlib.lines.Line2D instance at 0xa0db754c>]

In [77]: xlabel('10$^3$ M$_\odot$')
Out[77]: <matplotlib.text.Text instance at 0xa0daea2c>

In [78]: savefig('test.eps')

In [79]: matplotlib.__version__
Out[79]: '0.87.7'

In [80]: matplotlib.__revision__
Out[80]: '$Revision: 2835 $'


Maybe you need to upgrade, but that's just a guess.

-- 
cheers,
steve

Random number generation is the art of producing pure gibberish as
quickly as possible.


-------------------------------------------------------------------------
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
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to