Skip to content

Commit 589bd0d

Browse files
committed
docs(readme): refactor README with modern badges, features, examples, and streamlined installation
1 parent 4b72fcc commit 589bd0d

1 file changed

Lines changed: 34 additions & 82 deletions

File tree

README.md

Lines changed: 34 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -1,108 +1,60 @@
1-
# plotfig
2-
3-
## 简介
4-
5-
`plotfig` 是一个专为科学数据可视化设计的 Python 库,
6-
致力于为认知神经科研工作人员提供高效、易用且美观的图形绘制工具。
7-
该项目基于业界主流的可视化库—— `matplotlib``surfplot``plotly`等库开发,
8-
融合了三者的强大功能,能够满足神经科学以及脑连接组学中多种场景下的复杂绘图需求。
1+
<div align="center">
92

10-
![plotfig](https://github.com/RicardoRyn/plotfig/blob/main/docs/assets/plotfig.png)
11-
12-
### 项目结构
3+
# plotfig
134

14-
项目采用模块化设计,核心代码位于 `src/plotfig/` 目录下,包含如下主要功能模块:
5+
[![PyPI version](https://badge.fury.io/py/plotfig.svg)](https://badge.fury.io/py/plotfig)
6+
[![Python version](https://img.shields.io/badge/python-3.11+-blue.svg)](https://www.python.org/downloads/)
7+
[![License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
158

16-
- `bar.py`:条形图绘制,适用于分组数据的对比展示。
17-
- `matrix.py`:通用矩阵可视化,支持多种配色和注释方式。
18-
- `correlation.py`:相关性矩阵可视化,便于分析变量间的相关性分布。
19-
- `circos.py`:弦图可视化,适合平面展示脑区之间的连接关系。
20-
- `brain_surface.py`:脑表面可视化,实现三维脑表面图集结构的绘制。
21-
- `brain_connection.py`:玻璃脑连接可视化,支持复杂的脑网络结构展示。
9+
一个专为认知神经科学研究设计的 Python 可视化库,提供高效、易用且美观的绘图工具。
2210

23-
### 文档与示例
11+
![plotfig](./docs/assets/plotfig.png)
2412

25-
`plotfig` 提供了网页文档和使用示例。具体参见[使用教程](https://ricardoryn.github.io/plotfig/)
13+
</div>
2614

27-
## 安装
15+
## 功能特性
2816

29-
`plotfig` 支持通过包管理器安装或直接从源码中安装,要求 Python 3.11 及以上版本。
17+
- 📊 **多种图表类型**:条形图、矩阵、相关性图、弦图、脑表面图、脑连接图
18+
- 🎨 **专业科研风格**:内置多种配色方案,符合学术发表标准
19+
- 📈 **自动显著性检验**:内置多种统计方法,自动绘制显著性标记
20+
- 🔬 **专为神经科学设计**:支持常见灵长类脑区 atlas、脑网络可视化等特定场景
21+
- 🚀 **简单易用**:简洁的 API,快速上手
3022

31-
### 使用包管理器安装 (推荐)
23+
## 快速开始
3224

33-
=== "uv"
25+
```python
26+
import matplotlib.pyplot as plt
3427

35-
``` bash
36-
uv add plotfig
37-
```
28+
from plotfig import plot_one_group_bar_figure
3829

39-
=== "pip"
30+
# 绘制单组条形图
31+
data = [[1.2, 2.3, 3.1], [4.5, 5.6, 6.2]]
32+
plot_one_group_bar_figure(data)
33+
plt.show()
34+
```
4035

41-
``` bash
42-
pip install plotfig
43-
```
36+
## 安装
4437

45-
### 从源码中安装
38+
`plotfig` 要求 Python 3.11 及以上版本。
4639

47-
首先下载源码到某个目录(例如 `/path/to/plotfig`):
40+
**使用 uv 安装:**
4841

4942
```bash
50-
git clone https://github.com/RicardoRyn/plotfig.git /path/to/plotfig
43+
uv add plotfig
5144
```
5245

53-
然后在您的项目目录中执行:
54-
55-
=== "uv"
56-
57-
``` bash
58-
uv add /path/to/plotfig
59-
```
60-
61-
=== "pip"
62-
63-
``` bash
64-
pip install /path/to/plotfig
65-
```
66-
67-
> **注意**`/path/to/plotfig` 应替换为实际的路径。
68-
69-
### 贡献
70-
71-
如果您希望体验这些功能或参与 `plotfig` 的开发,可以选择以 开发模式(editable mode) 安装项目。
72-
73-
这种安装方式允许您对本地源码的修改立即生效,非常适合调试、开发和贡献代码。
74-
75-
推荐流程:
76-
77-
1. Fork 本仓库到您的 GitHub 账号
78-
2. 克隆您的 Fork 到本地:
46+
**使用 pip 安装:**
7947

8048
```bash
81-
git clone https://github.com/USERNAME/plotfig.git /path/to/plotfig
49+
pip install plotfig
8250
```
8351

84-
3. 在您的项目目录中以开发模式安装:
85-
86-
=== "uv"
87-
88-
``` bash
89-
uv add --editable /path/to/plotfig
90-
```
91-
92-
=== "pip"
93-
94-
``` bash
95-
pip install -e /path/to/plotfig
96-
```
97-
98-
> **注意**`/path/to/plotfig` 应替换为实际的路径。
99-
100-
---
52+
## 文档
10153

102-
**欢迎提交 Issue 或 PR!**
54+
详细文档和使用示例请访问 [plotfig 文档](https://ricardoryn.github.io/plotfig/)
10355

104-
无论是 Bug 报告、功能建议、还是文档改进。
56+
## 贡献
10557

106-
都非常欢迎在 [Issue](https://github.com/RicardoRyn/plotfig/issues) 中提出。
58+
欢迎提交 Issue 或 PR!无论是 Bug 报告、功能建议还是文档改进,都非常欢迎在 [Issue](https://github.com/RicardoRyn/plotfig/issues) 中提出。
10759

108-
也可以直接提交 [PR](https://github.com/RicardoRyn/plotfig/pulls),一起变得更强 💪!
60+
开发贡献流程请参见[贡献指南](https://ricardoryn.github.io/plotfig/)

0 commit comments

Comments
 (0)