在熊猫情节图例中显示非ASCII(日语)字符

在熊猫情节图例中显示非ASCII(日语)字符,第1张

熊猫情节图例中显示非ASCII(日语)字符
import numpy as npimport pandas as pdimport matplotlib.pyplot as pltimport matplotlib.font_manager as font_managerdf = pd.Dataframe( data=np.random.random( (2,2) ), columns=[u'é',u'日本'] )ax = df.plot()legend = ax.legend()font = font_manager.FontProperties(fname='/Users/user/Downloads/IPAfont00303/ipag.ttf')for text in legend.texts:    text.set_font_properties(font)plt.show()


欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/zaji/5668180.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-12-16
下一篇2022-12-16

发表评论

登录后才能评论

评论列表(0条)

    保存