Japanize Matplotlib

1.1.3 · maintenance · verified Thu Apr 16

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.

Common errors

Warnings

Install

Imports

Quickstart

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()

view raw JSON →