If I do this:
import pandas as pd
pd.DataFrame( data=nr.random( (2,2) ), columns=[u'é',u'日本'] ).plot()
Result:

So, édisplayed, but not 日本. After a bit of searching, I found this page , which seems to provide a solution for matplotlib. I downloaded the font file here and got it to work with matplotlib:
import matplotlib.font_manager as fm
prop = fm.FontProperties(fname='/Users/user/Downloads/IPAfont00303/ipag.ttf')
plt.plot( np.arange(10), np.arange(10), label=u'日本' )
plt.legend( prop=prop )
Result:

Then I tried to apply the same solution to pandas:
import matplotlib.font_manager as fm
prop = fm.FontProperties(fname='/Users/user/Downloads/IPAfont00303/ipag.ttf')
df0.plot( prop=prop )
Result:
TypeError: There is no line property "prop"
I understand the error message, but I do not know how I can use pandas to use prop=prop. Any help is appreciated.
source
share