Chaitanya Krishna <icymist@...287...> 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?
···
--
Jouni K. Sepp�nen
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
···
On Monday 06 April 2009 20:15:47 Jouni K. Seppänen wrote:
Chaitanya Krishna <icymist@...287...> 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?