MatplotlibグローバルフォントがTimesNewRomanに変更されました
Matplotlib Global Font Changed Times New Roman
1.追加されたコード:
import matplotlib.pyplot as plt plt.rc('font',family='Times New Roman')
2.エラーが発生した場合:
UserWarning: findfont: Font family [u'Times New Roman'] not found. Falling back to DejaVu Sans (prop.get_family(), self.defaultFamily[fontext]))
3.解決策:解決策:
sudo apt install msttcorefonts -qq rm ~/.cache/matplotlib -rf
4.msttcorefontsの問題をインストールします。
https://blog.csdn.net/besidemyself/article/details/7362341
押すTab
キーの選択ok
インストールを続行できます