Sorry, another really basic matplotlib question  ... how do I set the font 
family of the axis tick labels?  I am using wxPython/wxMpl and not the 
pylab interface so am trying to avoid getp/setp.  I could do this using 
matplotlib.rc but want to do it programatically

I tried

fig=self.get_figure()
ax1=fig.gca()
ax1.plot(x,y)
xt=ax1.get_xticklabels()
d = { 'family' : 'sans-serif' }
ax1.set_xticklabels(xt, d)

But Python goes haywire ... There has to be a simpler way but not found it yet.

I am trying to do the same for the legend properties.  So far we have

p=matplotlib.font_manager.FontProperties()
p.set_family('sans-serif')
p.set_size('small')
fig.legend(lines, titles, 'upper right', prop=p)

but this looks fairly cludgy - is there a more elegant way of doing the 
same thing?

Thanks in advance

Alun Griffiths



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to