https://github.com/koho/mpl-font
CJK font selector for matplotlib
https://github.com/koho/mpl-font
font matplotlib
Last synced: 8 months ago
JSON representation
CJK font selector for matplotlib
- Host: GitHub
- URL: https://github.com/koho/mpl-font
- Owner: koho
- Created: 2020-02-26T19:23:26.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-04-21T16:21:41.000Z (about 4 years ago)
- Last Synced: 2024-12-31T02:16:51.996Z (over 1 year ago)
- Topics: font, matplotlib
- Language: Python
- Homepage:
- Size: 53.5 MB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Mpl-Font
A CJK font selector for matplotlib to display CJK characters in an easy way.
## Supported Fonts
- Noto Sans CJK SC
- WenQuanYi Micro Hei
- Microsoft YaHei
## Install
```shell script
pip install mpl-font
```
## Usage
Just import the font you want to use, such as
```python
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:
```python
mpl_font.noto.set()
```