From: John H. <jdh...@ac...> - 2004-09-24 16:38:41
|
>>>>> "Humufr" == Humufr <hu...@ya...> writes: Humufr> Hello, I would like to know how can I change the Humufr> axes properties for the font of the tick label. I was Humufr> trying to use something like: Humufr> xticklabels = get(gca(), 'xticklabels') set(xticklabels, Humufr> 'fontweight', 'bold') Humufr> and that's work for some parameter (fontweight for Humufr> example) but it's not possible to choose some others like Humufr> the font type or the angle. You need to pick the right property names: rotation rather than angle, fontname or family for the fontname or family from matplotlib.matlab import * plot([1,2,3]) labels = get(gca(), 'xticklabels') set(labels, fontweight='bold', rotation=45, fontname='cmr10') show() You may want to read http://matplotlib.sourceforge.net/fonts.html and the fonts section in the rc file to decide if you want to use the family or fontname property. I think one of the reasons you may be having problem with the fontname is that matplotlib appears to fail silently when you specify a font that it doesn't find. In this case, it falls back on a known font. We hope to add a verbose feature so you can get some diagnostic information about what the font finder is doing. Humufr> Another things I saw in the website, a lot of links are Humufr> not working (example: Humufr> http://matplotlib.sourceforge.net/figure.html#Axis\ ) That should be http://matplotlib.sourceforge.net/matplotlib.figure.html#Axis. I fixed this (in my local copy). Let me know if you find some more. JDH |