seabornでは日本語は文字化けします。
リンクの記事のように、set fontでfontを設置すれば解決できますが、macだと’Yu Gothic’がなく、’IPAexGothic’はDL先にアクセスできない状態でした。
macではとりあえず以下のfontが使用できたのでその紹介です。
import seaborn as sns
sns.set(font='Hiragino Sans')#自分が使える日本語フォントを探して入れる
他のfontを使用したい場合には、以下のようなコードで調べることができます。
import matplotlib as mpl
font_paths = mpl.font_manager.findSystemFonts()
font_objects = mpl.font_manager.createFontList(font_paths)
font_names = [f.name for f in font_objects]
print(font_names)
一時的対応でない場合にはこちらも参考ください
コメント