Re: [Matplotlib-users] default mathtext font

2008-08-02 Thread Eli Brosh
Thank you Michael, I tried switching the matplotlib font to Dejavu Sans but it also does not seem to recognize the lunate epsilon ϵ. When I wrote title(u'ϵ-Fe'), it printed ε-Fe instead. I tried several other fonts but the problem did not disappear. It seems that the bes choice after all is to writ

Re: [Matplotlib-users] default mathtext font

2008-07-31 Thread Michael Droettboom
(Sorry for the delay -- just back from vacation) It looks like the default Vera Sans font that matplotlib uses doesn't actually have the lunate epsilon character. If you have it installed, you could have matplotlib use the DejaVu Sans font instead (which is essentially Vera Sans with a larger

Re: [Matplotlib-users] default mathtext font

2008-07-23 Thread Eli Brosh
Thanks, This unicode thing works like magic. The only thing I am still unable to do is to insert the symbol \epsilon (as distinct from \varepsilon). For some reason, the varepsilon ε is printed fine, but a blank square is printed instead of the lunate epsilon ϵ. That is u' ε ' works, while u' ϵ' d

Re: [Matplotlib-users] default mathtext font

2008-07-22 Thread Michael Droettboom
Yes, you would put it at the top of your .py file. In order to use Unicode in Python source code, you have to tell the Python interpreter what encoding the file is in. That's done with a little "magic" comment at the top of the file. The popular Unixy editors (emacs, vim etc.) also understand

Re: [Matplotlib-users] default mathtext font

2008-07-22 Thread Eli Brosh
Thanks, This seems to be a solution. I have an editor that supports unicode. But, can you please explain better how do I make the coding directive at the top of my source files ? Where do I write the command: # -*- coding: utf-8 -*- Is it inside the python script ? Sorry for the ignorance. Eli

Re: [Matplotlib-users] default mathtext font

2008-07-22 Thread Michael Droettboom
As an alternative, you could just use Unicode to insert the Greek characters: r"α-Fe (Someone 2003)" The default font used by matplotlib, Vera Sans, includes a full set of Greek characters. This, of course, requires an editor that supports Unicode and a coding directive at the top of your sour

Re: [Matplotlib-users] default mathtext font

2008-07-21 Thread Eli Brosh
Here is the use case I have in mind: Plotting properties of various phases of iron, I need a legend with greek letters and normal text: \alpha-Fe, Someone (2003) Now, I need the names e.g. someone to be upright. Also, the relbar between \alpha and Fe is shorter with normal text fonts than with ita

Re: [Matplotlib-users] default mathtext font

2008-07-21 Thread Michael Droettboom
Unfortunately there isn't. This is *theoretically* possible with the STIX fonts, but that hasn't been implemented. However, with the Computer Modern fonts, many of the glyphs simply aren't present (upright Greek, for example) to make this happen. That said, I'm not sure this is necessarily a

[Matplotlib-users] default mathtext font

2008-07-21 Thread Eli Brosh
Hello I there a way to change the default mathtext font from cal to rm ? I would like to use the rm (serif) font without stating rm{...} or mathrm{...}. Is it possible to do using the matplotlibrc ? can you give me an example of how this is done ? Thanks Eli ---