Sorry for the wild goose chase. Now that my memory has been jogged -- This is actually a known problem with the Cairo backend. Cairo only allows access to fonts installed in the normal OS-specific places (and /usr/lib/python2.5/site-packages/matplotlib/mpl-data/fonts/ttf is definitely not one of them... ;) Worse than that, AFAIK, there is know way of knowing whether a particular font was found, so we can't give users a nice warning message when your situation occurs.
To remedy: Install all of the matplotlib fonts into a standard place where fontconfig will find them (such as ~/.fonts). Then run fc-cache to regenerate the font cache. Matplotlib's Cairo backend should hopefully work after that. You can also use the regular PDF backend, which doesn't exhibit this problem. If there's a reason why the Cairo PDF output is better than the normal PDF backend's output for you, please let us know. What I'm puzzled by now is -- why did the Cairo backend work for you on the Mac? Did you install the fonts there? I'm not on the Mac much --- but I'd be very surprised if Cairo found the CM fonts as installed by matplotlib automagically there. Cheers, Mike Brian Baughman wrote: > Hello, > > Below is the requested output which looks correct to me: > [EMAIL PROTECTED]:~/dev/pyanalysis$ python > Python 2.5.1 (r251:54863, Oct 5 2007, 13:36:32) > [GCC 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> import matplotlib > >>> matplotlib.__file__ > '/usr/lib/python2.5/site-packages/matplotlib/__init__.pyc' > >>> matplotlib.__version__ > '0.91.2svn' > >>> matplotlib._get_data_path() > '/usr/lib/python2.5/site-packages/matplotlib/mpl-data' > > Deleting the ~/.matplotlib/fontManager.cache did not change the > behavior. Thanks for all the help. I really like using matplotlib on > my Mac but it doesn't have the power that my Ubuntu box has. > > Regards, > Brian > > On Dec 5, 2007, at 2:52 PM, Michael Droettboom wrote: > >> What's happening is that it isn't finding the Bakoma Computer Modern >> fonts. These have a non-standard encoding, so the '-' for instance, >> is actually under a different character code. >> >> So... we need to track down why it's looking in the wrong place. >> >> Can you send the output of: >> >> > python >> Python 2.5.1 (r251:54863, Jul 2 2007, 08:53:40) >> [GCC 3.4.6 20060404 (Red Hat 3.4.6-8)] on linux2 >> Type "help", "copyright", "credits" or "license" for more information. >> >>> import matplotlib >> >>> matplotlib.__file__ >> '/home/mdroe/usr/lib/python2.5/site-packages/matplotlib/__init__.pyc' >> >>> matplotlib.__version__ >> '0.91.2.svn' >> >>> matplotlib._get_data_path() >> '/home/mdroe/usr/lib/python2.5/site-packages/matplotlib/mpl-data' >> >>> >> >> You may also try deleting your font cache in >> ~/.matplotlib/fontManager.cache >> >> Cheers, >> Mike -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA ------------------------------------------------------------------------- SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users