一行代码搞定Python图表中文展示(Show Chinese in Figures with one line code)
Project description
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()
相似项目
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
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 zhplot-1.0.0.tar.gz.
File metadata
- Download URL: zhplot-1.0.0.tar.gz
- Upload date:
- Size: 6.3 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
79d357a8eff5e800f4daafa3696494db33b48eb206a991d36be36c40d8dba13a
|
|
| MD5 |
1b448255b16917a46dd797d25f238b4b
|
|
| BLAKE2b-256 |
e189398d0ce3a115a4c6daca733caf23a75cfe0392d2f3bdb2d85ada1d7a6533
|
Provenance
The following attestation bundles were made for zhplot-1.0.0.tar.gz:
Publisher:
python-publish.yml on shenxiangzhuang/zhplot
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
zhplot-1.0.0.tar.gz -
Subject digest:
79d357a8eff5e800f4daafa3696494db33b48eb206a991d36be36c40d8dba13a - Sigstore transparency entry: 157706195
- Sigstore integration time:
-
Permalink:
shenxiangzhuang/zhplot@cdf4af8ccb0f73507e62ddca54adbb3900fe10de -
Branch / Tag:
refs/tags/1.0.0 - Owner: https://github.com/shenxiangzhuang
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@cdf4af8ccb0f73507e62ddca54adbb3900fe10de -
Trigger Event:
release
-
Statement type:
File details
Details for the file zhplot-1.0.0-py3-none-any.whl.
File metadata
- Download URL: zhplot-1.0.0-py3-none-any.whl
- Upload date:
- Size: 6.3 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a5dccc5fc1116eafaa54d99c903ad74836e3ab9f5bdc45d27c29a97202268a2a
|
|
| MD5 |
6d553dec0d65b5b2e2ce21cc2adacda2
|
|
| BLAKE2b-256 |
dbf9c22988291c0ae3e60fa410e32eee6dbd69626c3fb0fcc1512d6a03b26bd4
|
Provenance
The following attestation bundles were made for zhplot-1.0.0-py3-none-any.whl:
Publisher:
python-publish.yml on shenxiangzhuang/zhplot
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
zhplot-1.0.0-py3-none-any.whl -
Subject digest:
a5dccc5fc1116eafaa54d99c903ad74836e3ab9f5bdc45d27c29a97202268a2a - Sigstore transparency entry: 157706197
- Sigstore integration time:
-
Permalink:
shenxiangzhuang/zhplot@cdf4af8ccb0f73507e62ddca54adbb3900fe10de -
Branch / Tag:
refs/tags/1.0.0 - Owner: https://github.com/shenxiangzhuang
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@cdf4af8ccb0f73507e62ddca54adbb3900fe10de -
Trigger Event:
release
-
Statement type: