Metadata-Version: 2.1
Name: paperplotlib
Version: 0.0.2
Summary: 论文实验数据绘图
Home-page: https://github.com/luzhixing12345/paperplotlib
License: MIT
Author: luzhixing12345
Author-email: luzhixing12345@163.com
Requires-Python: >=3.7,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Requires-Dist: matplotlib (>=3.7.0,<4.0.0)
Requires-Dist: numpy (>=1.23.5,<2.0.0)
Project-URL: Documentation, https://luzhixing12345.github.io/paperplotlib/
Project-URL: Repository, https://github.com/luzhixing12345/paperplotlib
Description-Content-Type: text/markdown

# paperplotlib

> 本项目还处于早期开发阶段, 欢迎反馈建议

paperplotlib 是基于 matplotlib 的论文实验数据绘图库, 意在快速绘制论文实验结果部分中常见的柱状图/折线图

本库提供了一组 **论文实验数据图的默认样式**, 以及一组相对简洁的 API 调用

一些绘制的示例代码和结果图见: [paperplotlib 示例](https://luzhixing12345.github.io/paperplotlib/articles/md-docs/使用示例/)

## 安装

```bash
pip install paperplotlib
```

## 快速开始

```python
import paperplotlib as ppl
import numpy as np

# 随机生成一个 5 x 7 的数据
a = 5
b = 7
y = np.random.randint(10, 100, size=(a, b))

group_names = [f"group {i}" for i in range(a)]
column_names = [f"column {i}" for i in range(b)]

graph = ppl.BarGraph()
graph.plot_2d(y, group_names, column_names)
graph.x_label = "The number of data"
graph.y_label = "Throughput (Mbps)"
graph.save()
```

![](./images/paperplotlib/result.png)

使用文档: [paperplotlib document](https://luzhixing12345.github.io/paperplotlib/)

## 参考

- [matplotlib](https://matplotlib.org/stable/users/index.html)
- [matplotlib.pyplot的使用总结大全](https://www.zhihu.com/tardis/zm/art/139052035?source_id=1003)
- [matplotlib.pyplot常用函数讲解大全(一)](https://zhuanlan.zhihu.com/p/139475633)
- [matplotlib.pyplot常用函数讲解大全(二)](https://zhuanlan.zhihu.com/p/139946399)

