mixing mathtext and regular text. possible?

Does anybody know a way to mix mathtext and regular text, for example in the axis label?

Something like

xlabel(r’$\rho^2$ along axis’)

doesn’t work. I know this is mentioned in the manual.
Just wondering if somebody knows a workaround rather than using the full Latex option.

Thanks, Mark

Don't have time to test now, but do I recall that \text is
implemented ->
xlabel(r'\\rho^2 \\text\{ along axis\}')

Cheers,
Alan Isaac

···

On Wed, 7 Dec 2005, Mark Bakker apparently wrote:

xlabel(r'\\rho^2 along axis')

Mark Bakker wrote:

Something like

xlabel(r'\\rho^2 along axis')

doesn't work. I know this is mentioned in the manual.

Does r'$\rho^2 \text{along axis}'

work/ I have no idea if it should, but that's how it's done in an equation environment in LaTeX.

-Chris

···

--
Christopher Barker, Ph.D.
Oceanographer
                                         
NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception

Chris.Barker@...259...

If you have dvipng and set text.usetex : True in your matplotlibrc file, then
xlabel(r'\\rho^2 along axis') works (and looks darn pretty thanks to Darren).

Ryan

···

On 12/7/05, Mark Bakker <markbak@...287...> wrote:

Does anybody know a way to mix mathtext and regular text, for example in the
axis label?

Something like

xlabel(r'\\rho^2 along axis')

doesn't work. I know this is mentioned in the manual.
Just wondering if somebody knows a workaround rather than using the full
Latex option.

Thanks, Mark