i get matplotlib from Sourceforge ,it’s matplotlib-1.0.0.win32-py2.6.exe
OS:Win7
ActivePython-2.6.6.15-win32-x86.msi
here is the code:
-- coding: utf-8 --
import matplotlib.pyplot as plt
plt.figure(figsize=(8,4))
a = plt.text(0.05, 0.05, u"Default Font缺省字体조선어にほんごภาษาไทย")#multi language ,some cann’t display
plt.text(0.05, 0.45, u"Microsoft YaHei微软雅黑", fontproperties=‘Microsoft YaHei’)#Chinese OK
plt.text(0.05, 0.25, u"LilyUPCภาษาไทย", fontproperties=‘LilyUPC’)#Tai OK
plt.xlabel(u"xlabelにほんご",fontproperties=‘STXihei’)#Japanese ,OK
plt.ylabel(u"ylabel조선어",fontproperties=‘Malgun Gothic’)#Korea,OK
plt.show()
C:\Python26\Lib\site-packages\matplotlib\mpl-data\matplotlibrc:
font.family : sans-serif
font.sans-serif : Microsoft YaHei,Malgun Gothic,LilyUPC,FangSong,YouYuan,SimHei,STKaiti,STSong,SimSun-ExtB,Webdings,Bitstream Vera Sans, Lucida Grande, Verdana, Geneva, Lucid, Arial, Helvetica, Avant Garde, sans-serif
it seems if a default font doesn’t have all char’s in the “Default Font缺省字体조선어にほんごภาษาไทย” string,it won’t display correctly.