importするだけでGraphvizを日本語対応にするパッケージ
Project description
japanize-graphviz
importするだけでGraphvizを日本語対応にします。
前提
Graphviz 本体(dot コマンド)が別途インストールされ、PATH が通っている必要があります。
- macOS:
brew install graphviz - Ubuntu/Debian:
sudo apt install graphviz - Windows:
winget install graphviz(インストール後にターミナルを再起動)
インストール
pip install japanize-graphviz
使い方
import japanize_graphviz # これだけ
from graphviz import Digraph
dot = Digraph()
dot.node('A', 'データ取得')
dot.node('B', '前処理')
dot.edge('A', 'B', label='生データ')
dot
使用フォントの確認
import japanize_graphviz
print(japanize_graphviz.current_font())
フォントを明示指定する
自動検出を上書きしたい場合は、import 前に環境変数を設定します。
export JAPANIZE_GRAPHVIZ_FONT="Noto Sans CJK JP"
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
japanize_graphviz-0.1.1.tar.gz
(83.5 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file japanize_graphviz-0.1.1.tar.gz.
File metadata
- Download URL: japanize_graphviz-0.1.1.tar.gz
- Upload date:
- Size: 83.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.22
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
afc372d7dc00a0e1f81a65c265f4a3eaf30bb3e0716eaf417eaac2e6e251d80d
|
|
| MD5 |
4cf0fdc6ac075dadc8d7ab00b4cbbcaf
|
|
| BLAKE2b-256 |
5fc410340b7f0ec1060dfa4e4f7711a786468267dacba2ea4c8fc3a2eefca529
|
File details
Details for the file japanize_graphviz-0.1.1-py3-none-any.whl.
File metadata
- Download URL: japanize_graphviz-0.1.1-py3-none-any.whl
- Upload date:
- Size: 4.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.22
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6ea17de556a5552740ceef412ae672e998d2d147af2a53e8f6fa38a09957373e
|
|
| MD5 |
91875f710494913b85ba6da775ca4538
|
|
| BLAKE2b-256 |
61658eb480adefeac8e0adcb87868088f0e50cbe1a3253a1dc324850a3d6b30a
|