matplotlibで日本語
日本語を扱う場合はfontファイルのパスを直値で設定するしかないのか?今のところそれ以外の解決方法が見つけられていないがメモ。
import matplotlib.pyplot as plt import matplotlib.font_manager as mng # MS ゴシック fProp = mng.FontProperties(fname=u'C:\\Windows\\Fonts\\msgothic.ttc') axis = plt.subplot(111) axis.bar(x, seqList) # グラフタイトルに日本語 plt.title(u'ぴったり10GB 11月', fontproperties=fProp)