I see what's going on here. Upper-case Greek letters are always upright (non-italic) in mathtext. TeX does this, and it is apparently a long standing American typographic convention.
So, when it goes to print the "\Delta", it looks at "mathtext.rm", which in your case you have set to "serif", which causes it to look at the setting for "font.serif", in which the first font it finds is "Bitstream Vera Serif", which doesn't have Greek characters. Personally, I like to set the math fonts explicitly, rather than using the font categories. This is what I set for using Arev Sans: mathtext.cal : Arev Sans:oblique mathtext.it : Arev Sans:oblique mathtext.rm : Arev Sans mathtext.bf : Arev Sans:bold mathtext.sf : Arev Sans I may consider adding "arev" and "arevsans" values to "mathtext.fontset" that would do nothing more than set the "mathtext.*" values to reasonable defaults to avoid this confusion. (Which would of course require that the Arev fonts are available -- they aren't included with matplotlib). I still think it's useful and reasonable to provide access to full font customization, but it would be nice to support the common case in a more direct way. Hope that helps. Cheers, Mike Rob Hetland wrote: > > On Dec 3, 2007, at 2:26 PM, Michael Droettboom wrote: > >> Can you send your matplotlibrc settings and the mathtext expression >> you are using? One or the other of those is causing Vera Serif to be >> used for the \Delta character rather than Arev Sans. > > > I get this error anytime I try to get a delta. E.g.: > > text(0.5, 0.5, r'$\Delta$) > > (I think this is what you mean by mathtext expresssion?) Here is the > relevant part of the matplotlibrc file: > > > font.family : sans-serif > font.style : normal > font.variant : normal > font.weight : medium > font.stretch : normal > # note that font.size controls default text sizes. To configure > # special text sizes tick labels, axes, labels, title, etc, see the rc > # settings for axes and ticks. Special text sizes can be defined > # relative to font.size, using the following values: xx-small, x-small, > # small, medium, large, x-large, xx-large, larger, or smaller > font.size : 12.0 > font.serif : STIX, Bitstream Vera Serif, New Century > Schoolbook, Century Schoolbook L, Utopia, ITC Bookman, Bookman, Nimbus > Roman No9 L, Times New Roman, Times, Palatino, Charter, serif > font.sans-serif : Arev Sans > #, Lucida Grande, Helvetica, Verdana, Geneva, Lucid, Avant Garde, > sans-serif > font.cursive : Zapfino, Apple Chancery, Textile, Sand, cursive > font.fantasy : Chicago, Comic Sans MS, Charcoal, Impact, Western, > fantasy > font.monospace : Bitstream Vera Sans Mono, Andale Mono, Nimbus Mono > L, Courier New, Courier, Fixed, Terminal, monospace > > text.color : black > text.usetex : False > text.dvipnghack : True > > ### MATHTEXT > mathtext.fallback_to_cm : False > mathtext.cal : sans:oblique > mathtext.it : sans:oblique > mathtext.rm : serif > mathtext.bf : sans:bold > mathtext.sf : sans > # mathtext.fontset : stixsans > mathtext.fontset : custom # for arev sans > > pdf.fonttype : 42 > > # pdf.use14corefonts : True > # ps.fonttype : 42 > # ps.useafm : True > > > > > ---- > Rob Hetland, Associate Professor > Dept. of Oceanography, Texas A&M University > http://pong.tamu.edu/~rob > phone: 979-458-0096, fax: 979-845-6331 > > -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA ------------------------------------------------------------------------- SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users