Skip to content

Commit 6e538f6

Browse files
committed
Merge pull request #41 from RicardoRyn/dev
Dev
2 parents b70f133 + 0299f07 commit 6e538f6

5 files changed

Lines changed: 14 additions & 20 deletions

File tree

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ wheels/
1212
# backup
1313
*.bak
1414

15-
# notebooks
15+
.vscode/*
1616
notebooks/figures/*
17-
1817
tests/figures/*

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ rm -rf surfplot
7777
推荐先 Fork 仓库,然后克隆您自己的 Fork 并安装 `dev` 分支:
7878

7979
```bash
80-
git clone -b dev https://github.com/ <your-username >/plotfig.git
80+
git clone -b dev https://github.com/<your-username>/plotfig.git
8181
cd plotfig
8282
pip install -e .
8383
```
@@ -90,4 +90,4 @@ pip install -e .
9090

9191
都非常欢迎在 [Issue](https://github.com/RicardoRyn/plotfig/issues) 中提出。
9292

93-
也可以直接提交 [PR](https://github.com/RicardoRyn/plotfig/pulls),一起变得更强 🙌
93+
也可以直接提交 [PR](https://github.com/RicardoRyn/plotfig/pulls),一起变得更强 💪

docs/installation.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ pip install .
5555
推荐先 Fork 仓库,然后克隆您自己的 Fork 并安装 `dev` 分支:
5656

5757
```bash
58-
git clone -b dev https://github.com/ <your-username >/plotfig.git
58+
git clone -b dev https://github.com/<your-username>/plotfig.git
5959
cd plotfig
6060
pip install -e .
6161
```
@@ -68,4 +68,4 @@ pip install -e .
6868

6969
都非常欢迎在 [Issue](https://github.com/RicardoRyn/plotfig/issues) 中提出。
7070

71-
也可以直接提交 [PR](https://github.com/RicardoRyn/plotfig/pulls),一起变得更强 🙌
71+
也可以直接提交 [PR](https://github.com/RicardoRyn/plotfig/pulls),一起变得更强 💪

src/plotfig/bar.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ def _stars(pval, i, y, color, fontsize):
205205
xy=(i, y),
206206
xytext=(j, y),
207207
arrowprops=dict(
208-
edgecolor=line_color, width=0.5, headwidth=0.1, headlength=0.1
208+
color=line_color, width=0.5, headwidth=0.1, headlength=0.1
209209
),
210210
)
211211
_stars(pval, (i + j) / 2, y + star_offset, color, fontsize)

tests/test.py

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,12 @@
1-
import random
1+
import numpy as np
2+
import matplotlib.pyplot as plt
3+
from plotfig import plot_one_group_bar_figure
24

3-
input_file = r"e:\git_repositories\plotfig\src\plotfig\data\neurodata\atlases\macaque_D99\label.txt"
4-
output_file = r"e:\git_repositories\plotfig\src\plotfig\data\neurodata\atlases\macaque_D99\label1.txt"
5+
fig, ax = plt.subplots()
56

6-
with open(input_file, "r", encoding="utf-8") as fin, \
7-
open(output_file, "w", encoding="utf-8") as fout:
7+
data1 = np.random.rand(10)
8+
data2 = np.random.rand(10)
89

9-
for idx, line in enumerate(fin, start=1):
10-
region_name = line.rstrip("\n")
11-
fout.write(region_name + "\n")
10+
ax = plot_one_group_bar_figure([data1, data2], ax=ax)
1211

13-
r = random.randint(0, 255)
14-
g = random.randint(0, 255)
15-
b = random.randint(0, 255)
16-
# 写格式:序号, r, g, b, 255
17-
fout.write(f"{idx} {r} {g} {b} 255\n")
12+
fig.savefig("test.png")

0 commit comments

Comments
 (0)