twitter facebook

matplotlibの日本語化

matplotlibの日本語化の方法を windows10 の anaconda の場合で説明します。

フォントをDL

フォントをコピー

~ anaconda3\Lib\site-packages\matplotlib\mpl-data\fonts\ttf
に 先ほどDLしたIPAexゴシック(ipaexg.ttf) をコピー
conda で仮想環境の場合は 以下の envs\deep\ のように 環境を考慮 ~ anaconda3\envs\deep\Lib\site-packages\matplotlib\mpl-data\fonts\ttf

matplotlibrcの変更

~ anaconda3\Lib\site-packages\matplotlib\mpl-data\matplotlibrc
matplotlibrc に font.family: IPAexGothic を追加

#追加
font.family:  IPAexGothic

#font.family:  sans-serif
#font.style:   normal
#font.variant: normal
#font.weight:  normal
#font.stretch: normal
#font.size:    10.0
AUTHOR
@えのえの
最終更新日 2021/05/06
FAVORITE good stock
LINK TAG
記法を見る