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
On Tue, Jul 22, 2008 at 10:14 AM, Michael Droettboom <[EMAIL PROTECTED]>
wrote:
> 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 source files, eg.:
>
> # -*- coding: utf-8 -*-
>
> Cheers,
> Mike
>
> Eli Brosh wrote:
>
>> 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 italics.
>>
>> I can solve the problem by using r'\rm{\alpha-Fe, Someone (2003)}' but it
>> would be easier if I could just change the defaults.
>>
>> Eli
>>
>>
>> On Mon, Jul 21, 2008 at 6:21 PM, Michael Droettboom <[EMAIL
>> PROTECTED]<mailto:
>> [EMAIL PROTECTED]>> wrote:
>>
>> 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 good idea. Math has
>> a set of commonly accepted conventions about when to use italic
>> vs. upright that may only confuse the reader when not followed.
>> Can you provide a use case?
>>
>> Cheers,
>> Mike
>>
>> Eli Brosh wrote:
>>
>> 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
>>
>> ------------------------------------------------------------------------
>>
>>
>> -------------------------------------------------------------------------
>> This SF.Net email is sponsored by the Moblin Your Move
>> Developer's challenge
>> Build the coolest Linux based applications with Moblin SDK &
>> win great prizes
>> Grand prize is a trip for two to an Open Source event anywhere
>> in the world
>> http://moblin-contest.org/redirect.php?banner_id=100&url=/
>> <http://moblin-contest.org/redirect.php?banner_id=100&url=/>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Matplotlib-users mailing list
>> Matplotlib-users@lists.sourceforge.net
>> <mailto:Matplotlib-users@lists.sourceforge.net>
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>
>>
>>
>>
> --
> Michael Droettboom
> Science Software Branch
> Operations and Engineering Division
> Space Telescope Science Institute
> Operated by AURA for NASA
>
>
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users