Zh-Plot: 一行代码搞定 Python 图表中文展示
支持的框架
快速开始
安装
使用 pip 安装zhplot:
pip install zhplot
使用 uv 安装zhplot:
uv add zhplot
使用方法
使用zhplot非常简单,只需在脚本开头导入即可:
+ import zhplot
import matplotlib.pyplot as plt
在汉化 wordcloud 的时候import zhplot需要在前面:
+ import zhplot
import wordcloud
一个简单的例子
import zhplot
import matplotlib.pyplot as plt
plt.plot([1, 2, 3, 4])
plt.title('这是一个标题')
plt.xlabel('横坐标')
plt.ylabel('纵坐标')
plt.show()
相似项目
Metadata
Release files for zhplot 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| zhplot-1.0.0.tar.gz | 6.3 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| zhplot-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 12.6 MB
Release files / zhplot-1.0.0.tar.gz
| Download URL | zhplot-1.0.0.tar.gz |
|---|---|
| Size | 6.3 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
79d357a8eff5e800f4daafa3696494db33b48eb206a991d36be36c40d8dba13a
|
|
BLAKE2b-256 checksum How to use checksums |
e189398d0ce3a115a4c6daca733caf23a75cfe0392d2f3bdb2d85ada1d7a6533
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.0.1 CPython/3.12.8
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 26, 2024.
Transparency logRelease files / zhplot-1.0.0-py3-none-any.whl
| Download URL | zhplot-1.0.0-py3-none-any.whl |
|---|---|
| Size | 6.3 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a5dccc5fc1116eafaa54d99c903ad74836e3ab9f5bdc45d27c29a97202268a2a
|
|
BLAKE2b-256 checksum How to use checksums |
dbf9c22988291c0ae3e60fa410e32eee6dbd69626c3fb0fcc1512d6a03b26bd4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.0.1 CPython/3.12.8
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 26, 2024.
Transparency log