Re: [Matplotlib-users] Display chinese labels

2010-10-14 Thread Benoit Gaillard
Thank you very much it all works fine now, I downloaded and installed the font in http://archive.ubuntu.com/ubuntu/pool/main/t/ttf-wqy-zenhei/ttf-wqy-zenhei_0.5.23.orig.tar.gz, as you advised. Then i deleted the fontList.cache de matplotlib to force its updating, and ran the script with

Re: [Matplotlib-users] Display chinese labels

2010-10-14 Thread sunqiang
You are welcome, glad to help. On Thu, Oct 14, 2010 at 4:04 PM, Benoit Gaillard benoit.gaill...@univ-tlse2.fr wrote: Thank you very much it all works fine now, I downloaded and installed the font in http://archive.ubuntu.com/ubuntu/pool/main/t/ttf-wqy-zenhei/ttf-wqy-zenhei_0.5.23.orig.tar.gz,

Re: [Matplotlib-users] Display chinese labels

2010-10-13 Thread Benoit Gaillard
Hi, When looking in my fontFile.cache, i did not find any of '/usr/share/fonts/truetype/wqy/wqy-zenhei.ttf', '/usr/share/fonts/truetype/wqy/wqy-microhei.ttf' or simhei. this is why i could not display the characters. I deleted the cache and re-lounched my script, so that mpl had to look

Re: [Matplotlib-users] Display chinese labels

2010-10-13 Thread Benoit Gaillard
Actually, i must apologize By calling fonts by their real name eg: WenQuanYi Zen Hei (instead of wqy-microhei, their file name), i can display them. So no worries for issue 2. However, I do not manage to export the png to pdf or eps due to the following error: TrueType font is missing

Re: [Matplotlib-users] Display chinese labels

2010-10-13 Thread sunqiang
On Wed, Oct 13, 2010 at 5:30 PM, Benoit Gaillard benoit.gaill...@univ-tlse2.fr wrote: Actually, i must apologize By calling fonts by their real name eg: WenQuanYi Zen Hei (instead of wqy-microhei, their file name), i can display them. So no worries for issue 2. However, I do not manage to

Re: [Matplotlib-users] Display chinese labels

2010-10-12 Thread sunqiang
maybe change the line axim.set_yticklabels(ytics,fontsize=15,family='fantasy') to axim.set_yticklabels(ytics,fontsize=15, fontname= simsun (founder extended)) (or replace fontname with simhei or microsoft yahei) is enough. or, put these two lines: mpl.rcParams['font.sans-serif'] = ['SimHei']

Re: [Matplotlib-users] Display chinese labels

2010-10-12 Thread Benoit Gaillard
Thank you for your help, but it does not seem to work. I have downloaded simhei fonts and added it in my directory /usr/shared/fonts/truetype but even by using fontname=simhei , or: mpl.rcParams['font.sans-serif'] = ['SimHei'] mpl.rcParams['axes.unicode_minus'] = False i still display empty

Re: [Matplotlib-users] Display chinese labels

2010-10-12 Thread sunqiang
oh, only test it on Windows yet. both sim heiand microsoft yahei are fontname on Windows Platform. maybe just copy Sim Hei to font directory is not enough? no clue here. I just test the script on Linux (Ubuntu 8.04, Python 2.5, matplotlib 0.98.4) with the follow steps: 1, find the configure

[Matplotlib-users] Display chinese labels

2010-10-11 Thread Benoit Gaillard
Hi, How can one display Mandarin labels in a plot, as yticks_labels for example? It looks to me that there is no font in matplotlib that can display Chinese characters? I can display accentuation from 'utf8' but i could not find a font family that would display Chinese characters. Here is an

Re: [Matplotlib-users] Display chinese labels

2010-10-11 Thread Michael Droettboom
On 10/10/2010 03:13 PM, Benoit Gaillard wrote: Hi, How can one display Mandarin labels in a plot, as yticks_labels for example? It looks to me that there is no font in matplotlib that can display Chinese characters? I can display accentuation from 'utf8' but i could not find a font family