>>> This is what I have:
>>> OS X Lion
>>> Fresh install of python 2.6 from macports
>>> Numpy version 1.6.1 (from macports)
>>> freetype (from macports)
>>> libpng (from macports)
>>> matplotlib 1.0.1 (from macports)
>>> 
>>> When I run my plotting script, I get the following error as soon as the 
>>> script starts (i.e., right after matplotlib is imported):
>>> /opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/__init__.py:403:
>>>  UserWarning: matplotlibrc text.usetex can not be used with *Agg backend 
>>> unless dvipng-1.5 or later is installed on your system
>>>   warnings.warn( 'matplotlibrc text.usetex can not be used with *Agg '
>>> 
>>> Note: I am using the PDF backend.
>>> 
>>> When I try to save the plot to a pdf file, I get the following error:
>>> /opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/font_manager.py:1242:
>>>  UserWarning: findfont: Font family ['serif'] not found. Falling back to 
>>> Bitstream Vera Sans
>>>   (prop.get_family(), self.defaultFamily[fontext]))
>>> 
>>> This is frustrating because it's a serif font that I need.
>>> 
>>> After much thought, and Googling, I found out how to suppress the first 
>>> warning message, and that is to add the directory where dvipng lives to my 
>>> PATH variable. It is worth noting here that dvipng version 1.5 does not 
>>> exist. The latest version is 1.14 as can be seen here: 
>>> http://download.savannah.gnu.org/releases/dvipng/
> 
> 
> Actually 1.5 does exist, it's just older than 1.14 (think of it as 1.05). Are 
> you sure that Matplotlib could "see" dvipng when it was built? During the 
> install, it should spit out a bunch of details at the beginning with a few 
> headings in all caps. Under the heading "OPTIONAL USETEX DEPENDENCIES", 
> what's listed next to dvipng?
> 
> -Tony

Hey Tony,

Thanks for your suggestion. I think it fixed the problem, at least for the 
build from source. I haven't tried the macports version, but for anyone with 
the same problem that's interested, you should run

sudo port install py26-matplotlib +dvipng +latex

if you want it to build with those optional dependencies.

Damon McDougall
d.mcdoug...@warwick.ac.uk
http://damon.is-a-geek.com
B2.39
Mathematics Institute
Coventry
West Midlands
CV4 7AL


------------------------------------------------------------------------------
Get a FREE DOWNLOAD! and learn more about uberSVN rich system, 
user administration capabilities and model configuration. Take 
the hassle out of deploying and managing Subversion and the 
tools developers use with it. 
http://p.sf.net/sfu/wandisco-dev2dev
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to