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-matplotlibVerified import paths — ran on the pinned version, not inferred.
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.
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')`).
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.