SourceForge logo
SourceForge logo
Menu

Re: [Matplotlib-users] Problems with LaTeX symbols

From: Zane S. <za...@id...> - 2008年11月25日 04:52:49
> We have two modes to render latex -- one is native TeX layout and uses
> latex and dvipng, and is superior if you need all of TeX's
> capabilities (eg an eqnarray), but the fonts are suboptimal. The
> other is mathtext, which will cover 98% of most users' math needs,
> does not require a latex install because it is pure mpl, and uses
> nicer fonts .
Well, if I turn off usetex, then the LaTeX symbols don't get rendered 
correctly. It's obviously trying to do something other than just 
write out the plain text, but it's not doing the right thing. I quit 
out of matplotlib, and re-purged all the cached stuff from 
my .matplotlib directory, and it's still failing. From the docs, it 
sounds like mathtext is just the default way for Text objects to get 
rendered. It fails the same way irrespective of whether I use a raw 
string, or a double-quoted string:
fit_ax.set_ylabel(r'$\delta_{rms}$ [degrees]')
fit_ax.set_ylabel("$\delta_{rms}$ [degrees]")
both give a capital 'C' with a subscript 'rms'
$\bar{D}$ results in a capital D with a little circle over it.
20ドル^\circ$ yields 20 raised to the little tiny 'e' power.
Even if I wipe my site-packages/matplotlib* directory and egg-info, 
make clean, and recompile and install matplotlib from the SVN source, 
I still get the same problem. I don't know if it means anything, but 
I note that the mpl-data/fonts directory in SVN has 282 sub-entries, 
and the mpl-data/fonts directory that's getting installed in my site- 
packages only has 99 sub-entries. But maybe they aren't supposed to 
be the same? Dunno.
So for now I can only get my math symbols to render with text.usetext 
turned on.
I'll read up on the text formatters. Thanks for all your help!
Zane
--
Zane Selvans
Amateur Earthling
za...@id...
303/815-6866
http://zaneselvans.org
PGP Key: 55E0815F

View entire thread

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 によって変換されたページ (->オリジナル) /