On Monday 06 April 2009 20:15:47 Jouni K. Seppänen wrote: > Chaitanya Krishna <icym...@gmail.com> writes: > > That is, when I use pylab.ylabel(r'$V [A^{3}]$') I don't get any space > > in between V and [. > > Like TeX, matplotlib ignores spaces in math mode and uses spacing > derived from the usual roles of the symbols. You need to use an explicit > command to add space. > > > I also tried using the math mode spacing for Latex, So, if I try to do > > pylab.ylabel(r'$V\;[A^{3}]$'), I only get V and not even A^3. > > On the current trunk, and on the v0_98_5 maintenance branch, that works > fine. At least the following spacing commands seem to work: r'$a\ b$', > r'$a\,b$', r'$a\;b$', r'$a\!b$' (negative space) and r'$a\quad b$' work. > Perhaps you can update to a newer version of matplotlib?
It is also possible to mix math mode and non-math mode. ylabel(r'$V$ [\AA$^3$]') (also note that units by convention are not italic...) Best regards Troels Kofoed Jacobsen ------------------------------------------------------------------------------ This SF.net email is sponsored by: High Quality Requirements in a Collaborative Environment. Download a free trial of Rational Requirements Composer Now! http://p.sf.net/sfu/www-ibm-com _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users