A CJK font selector for matplotlib to display CJK characters in an easy way.
- Noto Sans CJK SC
- WenQuanYi Micro Hei
- Microsoft YaHei
pip install mpl-font
Just import the font you want to use, such as
import mpl_font.noto # For Noto Sans CJK SC
import mpl_font.wqy # For WenQuanYi Micro Hei
import mpl_font.msyh # For Microsoft YaHei
Then matplotlib should be able to display CJK characters.
If the font is already imported but overwritten by others, you need to explicitly call the set
method of the font:
mpl_font.noto.set()