Finally found a solution for this -- actually just tried solution from
Piter_ <x.pi...@gmail.com> in his post -- deleted fontList.cache and it
works.  That is, just doing
rcParams['font.family'] = 'Times New Roman'
gives me that font as the default.

Jon

>         From: Michael Droettboom <md...@stsci.edu>
>         > > To: matplotlib-users@lists.sourceforge.net
>         > > Subject: Re: [Matplotlib-users] how to use different font
>         for serif
>         > > Date: Mon, 5 Dec 2011 14:49:09 -0500
>         > > 
>         > > What rcParams are you setting?
>         > > 
>         > > font.family: serif
>         > > font.serif: Times New Roman
>         > > 
>         > > and
>         > > 
>         > > font.family: Times New Roman
>         > > 
>         > > both work for me.
>         > > 
>         > > You have to use the name of the font as specified in the
>         file, not
>         > > the filename to specify the font (which is probably why
>         "times" is
>         > > not working for you).
>         > > 
>         > > Mike
>         
>         I tried both of those and just tried them again and neither
>         work for me:
>         
>         In [2]: rcParams['font.family'] = 'serif'
>         
>         In [3]: rcParams['font.serif'] = ['Times New Roman']
>         
>         In [4]: plot([0,1,2])
>         Out[4]: [<matplotlib.lines.Line2D object at 0x62d69d0>]
>         
>         In [5]: 
>         
> /usr/local/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]))
>         
>         
>         In [7]: rcParams['font.family'] = 'Times New Roman'
>         
>         In [8]: plot([0,1,2])
>         Out[8]: [<matplotlib.lines.Line2D object at 0x62ff210>]
>         
>         In [9]: 
>         
> /usr/local/lib/python2.6/site-packages/matplotlib/font_manager.py:1242:
>         UserWarning: findfont: Font family ['Times New Roman'] not
>         found.
>         Falling back to Bitstream Vera Sans
>           (prop.get_family(), self.defaultFamily[fontext]))
>         
>         What is it that tells the font_manager where to look?
>         
>         Jon


------------------------------------------------------------------------------
Cloud Services Checklist: Pricing and Packaging Optimization
This white paper is intended to serve as a reference, checklist and point of 
discussion for anyone considering optimizing the pricing and packaging model 
of a cloud services business. Read Now!
http://www.accelacomm.com/jaw/sfnl/114/51491232/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to