From 120842aaaf0036cd3b44a76927f81dec052bb462 Mon Sep 17 00:00:00 2001 From: Ricardo_T8 Date: Thu, 11 Sep 2025 08:36:14 +0800 Subject: [PATCH 1/3] docs(readme/web): change content MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 文档(readme/web): 更改内容 --- README.md | 4 ++-- docs/installation.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 5377270..e74a2d0 100644 --- a/README.md +++ b/README.md @@ -77,7 +77,7 @@ rm -rf surfplot 推荐先 Fork 仓库,然后克隆您自己的 Fork 并安装 `dev` 分支: ```bash -git clone -b dev https://github.com/ /plotfig.git +git clone -b dev https://github.com//plotfig.git cd plotfig pip install -e . ``` @@ -90,4 +90,4 @@ pip install -e . 都非常欢迎在 [Issue](https://github.com/RicardoRyn/plotfig/issues) 中提出。 -也可以直接提交 [PR](https://github.com/RicardoRyn/plotfig/pulls),一起变得更强 🙌! +也可以直接提交 [PR](https://github.com/RicardoRyn/plotfig/pulls),一起变得更强 💪! diff --git a/docs/installation.md b/docs/installation.md index 8c3616f..c720ad7 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -55,7 +55,7 @@ pip install . 推荐先 Fork 仓库,然后克隆您自己的 Fork 并安装 `dev` 分支: ```bash -git clone -b dev https://github.com/ /plotfig.git +git clone -b dev https://github.com//plotfig.git cd plotfig pip install -e . ``` @@ -68,4 +68,4 @@ pip install -e . 都非常欢迎在 [Issue](https://github.com/RicardoRyn/plotfig/issues) 中提出。 -也可以直接提交 [PR](https://github.com/RicardoRyn/plotfig/pulls),一起变得更强 🙌! +也可以直接提交 [PR](https://github.com/RicardoRyn/plotfig/pulls),一起变得更强 💪! From 25338dd2322b9bb88297b44a22c67a6b0d92a4cf Mon Sep 17 00:00:00 2001 From: Ricardo_T8 Date: Thu, 11 Sep 2025 11:52:14 +0800 Subject: [PATCH 2/3] =?UTF-8?q?fix(bar):=20=E4=BF=AE=E5=A4=8D=E7=BB=9F?= =?UTF-8?q?=E8=AE=A1=E7=BA=BF=E9=A2=9C=E8=89=B2=E6=9C=AA=E6=8C=89=E9=A2=84?= =?UTF-8?q?=E6=9C=9F=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/plotfig/bar.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plotfig/bar.py b/src/plotfig/bar.py index b3b228a..e8d88d9 100644 --- a/src/plotfig/bar.py +++ b/src/plotfig/bar.py @@ -205,7 +205,7 @@ def _stars(pval, i, y, color, fontsize): xy=(i, y), xytext=(j, y), arrowprops=dict( - edgecolor=line_color, width=0.5, headwidth=0.1, headlength=0.1 + color=line_color, width=0.5, headwidth=0.1, headlength=0.1 ), ) _stars(pval, (i + j) / 2, y + star_offset, color, fontsize) From 41e913db2b041c53771eb4f018c68f879b1ecea5 Mon Sep 17 00:00:00 2001 From: Ricardo_T8 Date: Sun, 19 Oct 2025 21:19:01 +0800 Subject: [PATCH 3/3] test(tests): change test file --- .gitignore | 3 +-- tests/test.py | 21 ++++++++------------- 2 files changed, 9 insertions(+), 15 deletions(-) diff --git a/.gitignore b/.gitignore index d01f89a..dacbf82 100644 --- a/.gitignore +++ b/.gitignore @@ -12,7 +12,6 @@ wheels/ # backup *.bak -# notebooks +.vscode/* notebooks/figures/* - tests/figures/* diff --git a/tests/test.py b/tests/test.py index 1c0b7f4..dc1bacc 100644 --- a/tests/test.py +++ b/tests/test.py @@ -1,17 +1,12 @@ -import random +import numpy as np +import matplotlib.pyplot as plt +from plotfig import plot_one_group_bar_figure -input_file = r"e:\git_repositories\plotfig\src\plotfig\data\neurodata\atlases\macaque_D99\label.txt" -output_file = r"e:\git_repositories\plotfig\src\plotfig\data\neurodata\atlases\macaque_D99\label1.txt" +fig, ax = plt.subplots() -with open(input_file, "r", encoding="utf-8") as fin, \ - open(output_file, "w", encoding="utf-8") as fout: +data1 = np.random.rand(10) +data2 = np.random.rand(10) - for idx, line in enumerate(fin, start=1): - region_name = line.rstrip("\n") - fout.write(region_name + "\n") +ax = plot_one_group_bar_figure([data1, data2], ax=ax) - r = random.randint(0, 255) - g = random.randint(0, 255) - b = random.randint(0, 255) - # 写格式:序号, r, g, b, 255 - fout.write(f"{idx} {r} {g} {b} 255\n") +fig.savefig("test.png")