Getting Matplotlib to Recognize OSX Fonts

Dear All,

I'm trying to get matplotlib to use some of my MacOSX fonts (Helvetica and Times) so that I can produce plots with these two fonts.

I'm using matplotlib installed with fink on MacOSX 10.5.8, and using XQuartz 2.4.0.

Has anyone tried to do this, and can they point me to a procedure to make matplotlib find these fonts?

Thanks! and all the best,

--Buz

matplotlib should pick up your installed fonts on OS-X --- but matplotlib only supports TrueType (and some OpenType) fonts. It won't work with Type 1 fonts -- it that what those particular ones are? Are you not able to use any of your installed fonts, or only some of them?

Cheers,
Mike

···

On 10/02/2009 01:59 PM, Buz Barstow wrote:

Dear All,

I'm trying to get matplotlib to use some of my MacOSX fonts (Helvetica
and Times) so that I can produce plots with these two fonts.

I'm using matplotlib installed with fink on MacOSX 10.5.8, and using
XQuartz 2.4.0.

Has anyone tried to do this, and can they point me to a procedure to
make matplotlib find these fonts?

Thanks! and all the best,

--Buz

------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
matplotlib-users List Signup and Options

Dear Buz,

You could try with the MacOSX native backend:

import matplotlib
matplotlib.use("MacOSX")
from pylab import *
text(0.2,0.2,"some text",fontname='Times-Roman')
text(0.2,0.7,"some other text",fontname='Helvetica')

I'm not sure if the MacOSX native backend is included in fink's distribution, though.

--Michiel.

···

--- On Fri, 10/2/09, Buz Barstow <buzb@...935...> wrote:

From: Buz Barstow <buzb@...935...>
Subject: [Matplotlib-users] Getting Matplotlib to Recognize OSX Fonts
To: "matplotlib-users" <matplotlib-users@lists.sourceforge.net>
Date: Friday, October 2, 2009, 1:59 PM
Dear All,

I'm trying to get matplotlib to use some of my MacOSX fonts
(Helvetica
and Times) so that I can produce plots with these two
fonts.

I'm using matplotlib installed with fink on MacOSX 10.5.8,
and using
XQuartz 2.4.0.

Has anyone tried to do this, and can they point me to a
procedure to
make matplotlib find these fonts?

Thanks! and all the best,

--Buz

------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer
Conference in SF, CA
is the only developer event you need to attend this year.
Jumpstart your
developing skills, take BlackBerry mobile applications to
market and stay
ahead of the curve. Join us from November 9-12, 2009.
Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
matplotlib-users List Signup and Options