On Fri, Jan 05, 2007 at 12:21:04PM -0500, [EMAIL PROTECTED] wrote:
> In my code I did family="sans-serif" but it didn't seem to have
> any effect.  Any ideas?

I was struggling with this myself this week.  Do:

    import matplotlib.font_manager
    fm = matplotlib.font_manager.FontManager()

If fm.ttfdict doesn't list a bunch of TrueType fonts that you think
should be listed, delete ~/.matplotlib/ttffont.cache , which will cause
it to be rebuilt the next time you import matplotlib.

Then try:

    import matplotlib.text
    t = matplotlib.text.Text( 'alskdjfalksdj' )
    t.get_fontname()
    p = t.get_font_properties()
    p.get_name()

If this last statement returns the first element of 
    matplotlib.rcParams[ 'font.sans-serif' ]
then I would think that everything is working like it ought to.

If you get something like 'vera' at some point, then the absolute-last
fallback font is being used (fm.defaultFont).

Contrary to the comments in the default matplotlibrc, it seems that
font.size does not set the fontsize for axis labels and ticks; you have
to set [xy]tick.labelsize and axes.labelsize explicitly.  But I haven't
had a chance to look into that ... yet.

hope that helps.

Glen



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to