{"id":9051,"library":"japanize-matplotlib","title":"Japanize Matplotlib","description":"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.","status":"maintenance","version":"1.1.3","language":"en","source_language":"en","source_url":"https://github.com/uehara1414/japanize-matplotlib","tags":["matplotlib","japanese","fonts","visualization","plotting"],"install":[{"cmd":"pip install japanize-matplotlib","lang":"bash","label":"PyPI"},{"cmd":"conda install -c uehara1414 japanize-matplotlib","lang":"bash","label":"Conda (uehara1414 channel)"}],"dependencies":[{"reason":"Core plotting library that this package extends for Japanese font support.","package":"matplotlib"}],"imports":[{"symbol":"japanize_matplotlib","correct":"import japanize_matplotlib"}],"quickstart":{"code":"import matplotlib.pyplot as plt\nimport japanize_matplotlib\n\nplt.plot([1, 2, 3, 4])\nplt.xlabel('簡単なグラフ (Simple Graph)')\nplt.ylabel('値 (Value)')\nplt.title('日本語タイトル (Japanese Title)')\nplt.grid(True)\nplt.show()","lang":"python","description":"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."},"warnings":[{"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')`).","message":"Importing `japanize_matplotlib` might be ineffective if other plotting libraries (e.g., Seaborn) are initialized afterward and override Matplotlib's font settings.","severity":"gotcha","affected_versions":"All versions"},{"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.","message":"Linters or code formatters may remove the `import japanize_matplotlib` line if they deem it unused, as its effect is side-dependent.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-04-16T00:00:00.000Z","next_check":"2026-07-15T00:00:00.000Z","problems":[{"fix":"Move `import japanize_matplotlib` to be the last import statement related to plotting, or call `japanize_matplotlib.japanize()` after any code that might modify font settings (e.g., `sns.set()`).","cause":"Another plotting library or custom Matplotlib configuration overwrites the font settings applied by `japanize_matplotlib` after its import.","error":"import japanize_matplotlib したのに日本語表示になりません"},{"fix":"If encountering this with Conda, try installing via pip: `pip install japanize-matplotlib`. This is often a reliable fallback for packages not fully supported across all Conda environments.","cause":"The `japanize-matplotlib` package, especially for certain OS/architectures (e.g., Windows), might not be available in the specified Conda channel.","error":"PackagesNotFoundError: The following packages are not available from current channels: - japanize-matplotlib"}]}