You may need to set your default font to something with those characters.

For example:

     import matplotlib
     matplotlib.rcParams['font.family'] = 'DejaVu Sans'

Mike

On 11/22/2011 05:41 AM, Yannick Copin wrote:
> Hi,
>
> I'm confused regarding the use of Unicode characters in matplotlib. I tried
> the following:
>
> <code>
>
> #!/usr/bin/env python
> # -*- coding: utf-8 -*-
>
> import matplotlib.pyplot as P
>
> ax = P.gca()
> ax.set_title(u"OK: ±×÷, Not OK: αβγδ")
> P.show()
>
> </code>
>
> The 1st "OK" characters are displayed correctly, while the "Not OK" ones are
> (well) not (while they are available from the Gnome Character Map). I have a
> standard matplotlib over a standard Ubuntu distribution...
>
> I'm aware I could use "r$\alpha$" and so on, but I'd like to stick to unicode
> characters... Is there any hope to use unicode greek characters?
>
> Cheers,


------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to