admin に投稿
ubuntu

フォント インストール

$ sudo apt install fonts-noto-cjk

 

$ mkdir .config/matplotlib
$ cp anaconda3/lib/python3.13/site-packages/matplotlib/mpl-data/matplotlibrc .config/matplotlib

 

【~/.config/matplotlib/matplotlibrc】
                                        

## ***************************************************************************
## * FONT                                                                    *
## ***************************************************************************
(省略)
font.family: "Noto Serif CJK JP"
## ***************************************************************************
## * TEXT                                                                    *
## ***************************************************************************

 

Visual Studio Code

 

インタープリターの選択

Image
VScode

 

テスト

import matplotlib.pyplot as plt

plt.title("今日はいい天気!")
plt.show()

 

Image
matplotlib