SourceForge logo
SourceForge logo
Menu

matplotlib-users

From: Mark B. <ma...@gm...> - 2005年12月07日 10:17:05
Does anybody know a way to mix mathtext and regular text, for example in th=
e
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
From: Alan G I. <ai...@am...> - 2005年12月07日 15:10:58
On Wed, 7 Dec 2005, Mark Bakker apparently wrote:=20
> xlabel(r'$\rho^2$ along axis')
Don't have time to test now, but do I recall that \text is=20
implemented ->
xlabel(r'$\rho^2 \text{ along axis}$')=20
Cheers,
Alan Isaac
From: Christopher B. <Chr...@no...> - 2005年12月07日 21:11:36
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
Chr...@no...
From: Ryan K. <rya...@gm...> - 2005年12月08日 05:48:23
If you have dvipng and set text.usetex : True in your matplotlibrc file, th=
en
xlabel(r'$\rho^2$ along axis') works (and looks darn pretty thanks to Darre=
n).
Ryan
On 12/7/05, Mark Bakker <ma...@gm...> 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
>
From: John H. <jdh...@ac...> - 2005年12月10日 18:42:20
>>>>> "Mark" == Mark Bakker <ma...@gm...> writes:
 Mark> Does anybody know a way to mix mathtext and regular text,
 Mark> for example in the axis label?
 Mark> Something like
 Mark> xlabel(r'$\rho^2$ along axis')
 Mark> doesn't work. I know this is mentioned in the manual. Just
 Mark> wondering if somebody knows a workaround rather than using
 Mark> the full Latex option.
This isn't supported yet, but it would be nice to do this. The two
things that have kept me from focusing more attention to mathtext are
the fact that the bakoma fonts we use are so bad noone wants to use
them (Nicholas recently submitted a patch for PS which allows
matplotlib mathtext to work with native PS AFM fonts) and that there
is not TeX/LaTeX integration. Nonetheless, it would be nice to
support this syntax. 
The current workaround is to use the roman fonts
 Mark> xlabel(r'$\rho^2$\ \rm{along\ axis}')
but since kerning is not supported in the bakoma fonts it doesn't look
that good, typically.
JDH
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /