Registry / data / japanize-matplotlib

japanize-matplotlib

JSON →
library1.1.3pypypiunverified

Japanize Matplotlib (version 1.1.3) is a Python library that automatically configures Matplotlib to display Japanese fonts correctly. It simplifies the process of handling Japanese text in plots by applying a default font (IPAexGothic) to Matplotlib's settings upon import. The library is currently in maintenance mode, with the last major update in October 2020.

pip install japanize-matplotlib
INSTALL
IMPORT
SIG · JAPANIZE-MATPLOTLI
J
japanize-matplotlib
datapythonv1.1.3
Install
8.6s avg
Import
1723ms
Disk
187MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.1.3 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.910 runs
installs and imports cleanly · install 0.0s · import 1.098s · 184.7MB
glibc
py 3.103.910 runs
installs and imports cleanly · install 8.6s · import 0.969s · 177MB
187MB installed
● package 187MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

japanize_matplotlib
import japanize_matplotlib
import japanize-matplotlib

Import `japanize_matplotlib` after `matplotlib.pyplot` to automatically configure Japanese font display. Then, create your plots as usual, and Japanese text will be rendered correctly.

import matplotlib.pyplot as plt import japanize_matplotlib plt.plot([1, 2, 3, 4]) plt.xlabel('簡単なグラフ (Simple Graph)') plt.ylabel('値 (Value)') plt.title('日本語タイトル (Japanese Title)') plt.grid(True) plt.show()
Debug
Known issues
gotchaImporting `japanize_matplotlib` might be ineffective if other plotting libraries (e.g., Seaborn) are initialized afterward and override Matplotlib's font settings.
fix
Ensure `import japanize_matplotlib` occurs *after* other plotting library initializations (e.g., `sns.set()`), or explicitly call `japanize_matplotlib.japanize()` after such calls. Alternatively, configure the other library to use 'IPAexGothic' font directly (e.g., `sns.set(font='IPAexGothic')`).
affects: All versions
gotchaLinters or code formatters may remove the `import japanize_matplotlib` line if they deem it unused, as its effect is side-dependent.
fix
To prevent removal, add a `# noqa: F401` comment to the import line (e.g., `import japanize_matplotlib # noqa: F401`) or explicitly call `japanize_matplotlib.japanize()` in your code.
affects: All versions
Upgrade
Version history
1.1.3latest on PyPI · released Oct 21, 2020
Audit
Dependencies
matplotlibrequiredCore plotting library that this package extends for Japanese font support.
Agent activity
4 hits · last 30 days
node
4
Resources
japanize-matplotlib — pip install japanize-matplotlib · libregistry