LoginSignup
1
1

More than 5 years have passed since last update.

jupyter notebookで豆腐問題を解決するときになかなかうまくいかなかったのでその解決録

Posted at

以下の手順でやると色々トラブりはしたが無事日本語設定にすることができた

  • フォントのダウンロード(IPAexGothic)
  • 設定ファイルのコピー・追記(毎回fontfamilyを設定するのならこれは不要)
  • キャッシュを削除
  • fontList.jsonを削除!!
  • ここら辺でmacごと再起動

現在設定されているフォントの確認

import matplotlib
matplotlib.rcParams.get('font.family')

どこのmatplotlibの設定ファイルを見ているのかの確認

import matplotlib as mpl
print(mpl.matplotlib_fname())

今使えるフォントの表示

import matplotlib.font_manager as fm
fm.findSystemFonts()
plt.rcParams['font.family'] = 'IPAexGothic'
1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1