{"id":22551308,"url":"https://github.com/shenxiangzhuang/zhplot","last_synced_at":"2025-04-10T03:25:51.927Z","repository":{"id":265374475,"uuid":"895871334","full_name":"shenxiangzhuang/zhplot","owner":"shenxiangzhuang","description":"一行代码搞定 Python 图表中文展示","archived":false,"fork":false,"pushed_at":"2025-04-08T03:33:31.000Z","size":12692,"stargazers_count":29,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-08T04:23:52.296Z","etag":null,"topics":["chinese","data-visualization","matplotlib","plot","python","python3","wordcloud"],"latest_commit_sha":null,"homepage":"https://datahonor.com/zhplot/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shenxiangzhuang.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-29T04:50:09.000Z","updated_at":"2025-04-08T03:16:04.000Z","dependencies_parsed_at":"2024-12-17T07:37:34.333Z","dependency_job_id":"77822dc8-2627-4a66-a955-60cd42edbcc4","html_url":"https://github.com/shenxiangzhuang/zhplot","commit_stats":null,"previous_names":["shenxiangzhuang/zhplot"],"tags_count":5,"template":false,"template_full_name":"shenxiangzhuang/mppt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shenxiangzhuang%2Fzhplot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shenxiangzhuang%2Fzhplot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shenxiangzhuang%2Fzhplot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shenxiangzhuang%2Fzhplot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shenxiangzhuang","download_url":"https://codeload.github.com/shenxiangzhuang/zhplot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247776602,"owners_count":20994127,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chinese","data-visualization","matplotlib","plot","python","python3","wordcloud"],"created_at":"2024-12-07T17:12:07.487Z","updated_at":"2025-04-10T03:25:51.918Z","avatar_url":"https://github.com/shenxiangzhuang.png","language":"Python","readme":"# Zh-Plot: 一行代码搞定 Python 图表中文展示\n\n[![Python](https://img.shields.io/pypi/pyversions/zhplot.svg?color=%2334D058)](https://pypi.org/project/zhplot/)\n[![PyPI](https://img.shields.io/pypi/v/zhplot?color=%2334D058\u0026label=pypi%20package)](https://pypi.org/project/zhplot/)\n[![PyPI Downloads](https://static.pepy.tech/badge/zhplot)](https://pepy.tech/projects/zhplot)\n\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)\n[![Imports: isort](https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat\u0026labelColor=ef8336)](https://pycqa.github.io/isort/)\n[![Checked with mypy](https://www.mypy-lang.org/static/mypy_badge.svg)](https://mypy-lang.org/)\n[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit)](https://github.com/pre-commit/pre-commit)\n\n[![Build Docs](https://github.com/shenxiangzhuang/zhplot/actions/workflows/build_docs.yaml/badge.svg)](https://github.com/shenxiangzhuang/zhplot/actions/workflows/build_docs.yaml)\n[![Test](https://github.com/shenxiangzhuang/zhplot/actions/workflows/test.yaml/badge.svg)](https://github.com/shenxiangzhuang/zhplot/actions/workflows/test.yaml)\n[![Codecov](https://codecov.io/gh/shenxiangzhuang/zhplot/branch/master/graph/badge.svg)](https://codecov.io/gh/shenxiangzhuang/zhplot)\n[![GitHub License](https://img.shields.io/github/license/shenxiangzhuang/zhplot)](https://github.com/shenxiangzhuang/zhplot/blob/master/LICENSE)\n\n\n## 支持的框架\n- [x] [matplotlib](https://github.com/matplotlib/matplotlib)\n- [x] [wordcloud](https://github.com/amueller/word_cloud)\n\n\n## 快速开始\n\n### 安装\n\n使用 [pip](https://pip.pypa.io/) 安装`zhplot`:\n\n```bash\npip install zhplot\n```\n\n使用 [uv](https://docs.astral.sh/uv/) 安装`zhplot`:\n\n```bash\nuv add zhplot\n```\n\n\n### 使用方法\n\n使用`zhplot`非常简单，只需在脚本开头导入即可：\n```diff\n+ import zhplot\nimport matplotlib.pyplot as plt\n```\n\n在汉化 wordcloud 的时候`import zhplot`需要在前面：\n```diff\n+ import zhplot\nimport wordcloud\n```\n\n### 一个简单的例子\n\u003cdiv align=\"center\"\u003e\n    \u003cimg src=\"https://github.com/shenxiangzhuang/zhplot/blob/7569552e07a8b4de7afd8c9df5cbcb154a349e97/docs/images/zhplot_demo.png?raw=true\" width=\"500\"/\u003e\n\u003c/div\u003e\n\n```python\nimport zhplot\nimport matplotlib.pyplot as plt\n\n\nplt.plot([1, 2, 3, 4])\nplt.title('这是一个标题')\nplt.xlabel('横坐标')\nplt.ylabel('纵坐标')\nplt.show()\n```\n\n\n## 相似项目\n- [japanize-matplotlib](https://github.com/uehara1414/japanize-matplotlib)\n- [chineseize-matplotlib](https://github.com/cndeng/chineseize-matplotlib)\n","funding_links":[],"categories":["Python"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshenxiangzhuang%2Fzhplot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshenxiangzhuang%2Fzhplot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshenxiangzhuang%2Fzhplot/lists"}