Jesper Larsen <jesper.webm...@gmail.com> writes:

> wind = u'\u98ce'
> p.title(wind)

> But there is just a box instead of the proper character on the plot.
> Any ideas what went wrong? Do I have to use a special font?

Of course you need a font that contains the Chinese characters you are
using. I have no idea whether matplotlib has any issues with such fonts
(though I think e.g. OpenType is only partially supported), but getting
a box sounds like the font does not have the character you need.

> I also tried using TeX following the example here:
> http://matplotlib.sourceforge.net/examples/pylab_examples/tex_unicode_demo.html
> but it did not work when I put in Chinese symbols.

TeX's Unicode support is not at all complete - matplotlib merely selects
the utf8 input encoding, which isn't enough to make TeX work with Chinese.
Perhaps the instructions http://www.math.nus.edu.sg/aslaksen/cs/cjk.html
will get you started if you want to go the TeX route.

-- 
Jouni K. Seppänen
http://www.iki.fi/jks


------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to