Metadata-Version: 2.1
Name: zhplot
Version: 0.2.0
Summary: Show Chinese in Figures with one line code.
Author-email: Xiangzhuang Shen <datahonor@gmail.com>
License: MIT
Project-URL: Homepage, https://shenxiangzhuang.github.io/zhplot
Project-URL: Bug Tracker, https://shenxiangzhuang.github.io/zhplot/issues
Project-URL: Documentation, https://shenxiangzhuang.github.io/zhplot
Project-URL: Source Code, https://github.com/shenxiangzhuang/zhplot
Project-URL: Release Notes, https://shenxiangzhuang.github.io/zhplot/changelog/
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: matplotlib>=3.9.2
Provides-Extra: dev
Requires-Dist: pre-commit; extra == "dev"
Requires-Dist: ipython; extra == "dev"
Requires-Dist: black; extra == "dev"
Requires-Dist: flake8; extra == "dev"
Requires-Dist: mypy; extra == "dev"
Requires-Dist: isort; extra == "dev"
Requires-Dist: ruff; extra == "dev"
Requires-Dist: pytest; extra == "dev"
Requires-Dist: pytest-cov; extra == "dev"
Requires-Dist: pytest-sugar; extra == "dev"
Requires-Dist: hypothesis>=6.112.0; extra == "dev"
Requires-Dist: commitizen; extra == "dev"
Provides-Extra: docs
Requires-Dist: mkdocs; extra == "docs"
Requires-Dist: mkdocs-material; extra == "docs"
Requires-Dist: mkdocs-material-extensions; extra == "docs"
Requires-Dist: mkdocstrings; extra == "docs"
Requires-Dist: mkdocstrings-python; extra == "docs"
Requires-Dist: mkdocs-autorefs; extra == "docs"
Requires-Dist: mkdocs-git-committers-plugin-2; extra == "docs"
Requires-Dist: mkdocs-git-revision-date-localized-plugin; extra == "docs"

# Zh-Plot: Show Chinese in Figures with one line code

[![Python](https://img.shields.io/pypi/pyversions/zhplot.svg?color=%2334D058)](https://pypi.org/project/zhplot/)
[![PyPI](https://img.shields.io/pypi/v/zhplot?color=%2334D058&label=pypi%20package)](https://pypi.org/project/zhplot/)

[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![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)
[![Imports: isort](https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336)](https://pycqa.github.io/isort/)
[![Checked with mypy](https://www.mypy-lang.org/static/mypy_badge.svg)](https://mypy-lang.org/)
[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit)](https://github.com/pre-commit/pre-commit)

[![Build Docs](https://github.com/shenxiangzhuang/zhplot/actions/workflows/build_docs.yaml/badge.svg)](https://github.com/shenxiangzhuang/zhplot/actions/workflows/build_docs.yaml)
[![Test](https://github.com/shenxiangzhuang/zhplot/actions/workflows/test.yaml/badge.svg)](https://github.com/shenxiangzhuang/zhplot/actions/workflows/test.yaml)
[![Codecov](https://codecov.io/gh/shenxiangzhuang/zhplot/branch/master/graph/badge.svg)](https://codecov.io/gh/shenxiangzhuang/zhplot)
[![GitHub License](https://img.shields.io/github/license/shenxiangzhuang/zhplot)](https://github.com/shenxiangzhuang/zhplot/blob/master/LICENSE)


## 快速开始

### 安装

使用 pip 安装`zhplot`:

```bash
pip install zhplot
```

使用 uv 安装`zhplot`:

```bash
uv add zhplot
```

### 使用方法

使用`zhplot`非常简单，只需在脚本开头导入即可：
```diff
+ import zhplot
import matplotlib.pyplot as plt
```

### 支持的框架
- [x] [matplotlib](https://github.com/matplotlib/matplotlib)
- [x] [wordcloud](https://github.com/amueller/word_cloud)

### 一个简单的例子
<div align="center">
    <img src="https://github.com/shenxiangzhuang/zhplot/blob/7569552e07a8b4de7afd8c9df5cbcb154a349e97/docs/images/zhplot_demo.png?raw=true" width="500"/>
</div>

```python
import zhplot
import matplotlib.pyplot as plt


plt.plot([1, 2, 3, 4])
plt.title('这是一个标题')
plt.xlabel('横坐标')
plt.ylabel('纵坐标')
plt.show()
```


## 相似项目
- [japanize-matplotlib](https://github.com/uehara1414/japanize-matplotlib)
- [chineseize-matplotlib](https://github.com/cndeng/chineseize-matplotlib)
