Hi, Thanks for the suggestions. I have stopped using the usetex option. To make math and normal text match, I tried the following:
rcParams['font.family'] = 'serif' rcParams['mathtext.fontset'] = 'stix' This didn't make them match - normal text looked to me like it was still sans-serif, while mathtext was with serif. Is there something else I should be doing to make this happen? Thanks again for your help. Cheers, David On Thu, 2008-07-10 at 11:52 -0400, Darren Dale wrote: > Hi David, > > On Thursday 10 July 2008 11:15:37 am David M. Kaplan wrote: > > 2) I have noticed that the font used for the xticklabels and the font > > used for the xlabel and contour labels appears to be different (example > > attached). One appears to be serif and the other sans-serif. This > > seems to be due to using tex for text rendering. I am not sure if this > > also occurred before the update, but I didn't notice it previously. > > It has always been this way. We tried a workaround once a couple years back > and it turned into a real mess. > > > Looking at the properties of the different text objects, it isn't > > apparent that there should be a difference - both have font properties > > that indicate sans-serif, but the text of tick labels appears to be > > surrounded by $'s forcing it through the text parser, while that of the > > contour labels is not. Is this difference normal or expected? Is there > > a way around this? In particular, I would like to use sans-serif for > > everything - is this possible while still using tex? > > I think there is a package, sansmath or something like that, that will allow > latex to use sans-serif fonts in math mode. You could try adding it to the > text.latex.preamble rc setting, but that option is not officially supported. > > If you don't like the limitations of latex, you might want to turning off > usetex and just use matplotlibs mathtext, which recently got a significant > rewrite and is now quite capable thanks to Mike Droettboom. Here's some > documentation too: > http://matplotlib.sourceforge.net/doc/html/users/mathtext.html > > Darren -- ********************************** David M. Kaplan Charge de Recherche 1 Institut de Recherche pour le Developpement Centre de Recherche Halieutique Mediterraneenne et Tropicale av. Jean Monnet B.P. 171 34203 Sete cedex France Phone: +33 (0)4 99 57 32 27 Fax: +33 (0)4 99 57 32 95 http://www.ur097.ird.fr/team/dkaplan/index.html ********************************** -- ********************************** David M. Kaplan Assistant Researcher UCSC / Institute of Marine Sciences Ocean Sciences 1156 High St. SC, CA 95064 Phone: 831-459-4789 Fax: 831-459-4882 http://pmc.ucsc.edu/~dmk/ ********************************** ------------------------------------------------------------------------- Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08 _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users