Setting font family in ticks not possible. Bug?

Dear Mailinglist,

Today I tried to change the fontset to sans-serif for a whole plot.
Everything except the ticks could be adjusted.

This is what I tried first:

···

*******************************************************
ffont = {'size':'20','family':'sans-serif'}
xticks(**ffont)
*******************************************************
No change in the font family. But I can change the size without
problems. I removed the ~/.matplotlib/FONTCACHE stuff as described
here(2).

Following (1) I tried again to change the font using
*******************************************************
import pylab
pylab.figure()
ax = pylab.axes()
ax.plot(pylab.arange(10))
xlabels = ax.get_xticklabels()
xlabel0 = xlabels[0] # one of the xtick
labels
xlabel0.get_fontsize()
xlabel0.set_fontsize(20)
pylab.show()
*******************************************************
Again nothing changed.

Using ipython I got this:
*******************************************************
In [192]: xlabels[0].get_fontname()
Out[192]: 'Bitstream Vera Serif, New Century Schoolbook, serif'

In [195]: xlabels[0].set_family("sans-serif")

In [196]: xlabels[0].get_fontname()
Out[196]: 'Bitstream Vera Sans, Lucida Grande, Verdana, sans-serif'

In [197]: show()
*******************************************************

Summary:
It appears to me like I can change the default fontfamily, but somehow
there is no change in the output.

What could be the problem?

Best regards:
   Gerolf

(1) http://www.nabble.com/axes-numbers-font-size-td14459877.html
(2) http://matplotlib.sourceforge.net/faq.html#FONTMISSING

--
Dipl. Phys. Gerolf Ziegenhain
Web: http://gerolf.ziegenhain.com
Email: mail.gerolf@...1807...
Fax: +49 611 18840599
Phone: +49 611 18840590
Office: Erwin-Schr�dinger-Str. 46 / Room 46.332 / 67663 Kaiserslautern / Germany
Private: Klopstockstr. 21 / 65187 Wiesbaden / Germany

Gerolf Ziegenhain wrote:

Dear Mailinglist,

Today I tried to change the fontset to sans-serif for a whole plot.
Everything except the ticks could be adjusted.

This is what I tried first:
*******************************************************
ffont = {'size':'20','family':'sans-serif'}
xticks(**ffont)
*******************************************************
  

Hmmm... This works for me. What backend are you using? Perhaps it isn't updating? Also, do these two lines + show() alone not work, or is it only in the context of something else?

Also, what platform are you on?

Mike

···

--
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA