On 05/26/2010 04:47 PM, T J wrote:
> When I plot, I get:
>
> UserWarning: findfont: Font family ['sans-serif'] not found. Falling
> back to Bitstream Vera Sans
>    (prop.get_family(), self.defaultFamily[fontext]))
>
> My matplotlibrc file has:
>
> font.sans-serif: Computer Modern Sans Serif
> font.serif:      Computer Modern Roman
> font.monospace:  Computer Modern Typewriter
>
> Have I typed these names incorrectly?  I recently (two days ago)
> upgraded to the latest SVN of matplotlib and that is when the warning
> started appearing.  I have a working TeXLive distribution in linux, so
> the fonts should exist on my computer.
>    
The warning was recently introduced in SVN, but the behaviour shouldn't 
have changed -- it's just a little more "in your face" now that 
something may not be what you expect.

TeXLive doesn't usually install Truetype versions of the Computer Modern 
fonts.  You can use the Computer Modern Bakoma fonts that come with 
matplotlib by using "cmr10", "cmss10" etc. (see mpl-data/fonts/ttf for a 
list of the available ones), or for fonts that are a little more 
friendly and have standard unicode character points, you may want to 
install these:

http://cm-unicode.sourceforge.net/

Or, you can side-step all this and set the rcParam "text.usetex" to 
True, which will render all the text in the plot with TeX itself.

Mike

------------------------------------------------------------------------------

_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to