On Thursday 27 March 2008 01:27:28 pm Gerolf Ziegenhain wrote: > More complete: > > I tried all permunations of backends. Now I stick to PS, because I use > matplotlib from commandline with scripts. The environment is debian/etch > with a current version of matplotlib (self compiled). > > Try this script > ******************************************** > from pylab import * > > t = arange(0.0, 2.0, 0.01) > s = sin(2*pi*t) > plot(t, s) > grid(True) > > # matlab handle graphics style > xticklines = getp(gca(), 'xticklines') > yticklines = getp(gca(), 'yticklines') > xgridlines = getp(gca(), 'xgridlines') > ygridlines = getp(gca(), 'ygridlines') > xticklabels = getp(gca(), 'xticklabels') > yticklabels = getp(gca(), 'yticklabels') > > setp(xticklines, 'linewidth', 3) > setp(yticklines, 'linewidth', 3) > setp(xgridlines, 'linestyle', '-') > setp(ygridlines, 'linestyle', '-') > setp(yticklabels, 'color', 'r', fontsize='medium') > setp(xticklabels, 'color', 'r', fontsize='medium', family='sans-serif') > > savefig('axprops_demo') > ****************************************** > > On my system the line > setp(xticklabels, 'color', 'r', fontsize='medium', family='sans-serif') > doesn't change the font family.
Do you use "usetex"? If you do, the mathtext is rendered using latex, and latex renders mathtext in serif fonts. Darren ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users