forked from cvlab-yonsei/MNAD
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRunner_Paper_Draw.py
91 lines (68 loc) · 2.46 KB
/
Runner_Paper_Draw.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
import matplotlib.pyplot as plt
import numpy as np
from alisuretool.Tools import Tools
def abl_k():
labels = ['5', '7', '9', '11', '13']
acc = [94.91, 95.13, 96.68, 96.20, 96.33]
x = np.arange(len(labels)) # the label locations
width = 0.5 # the width of the bars
fig, ax = plt.subplots(figsize=(4,3))
rects1 = ax.bar(x, acc, width, label='AUC')
# line1 = ax.plot(x, acc, color="blue", linestyle='--', marker='o', linewidth=2, markersize=8)
# Add some text for labels, title and custom x-axis tick labels, etc.
ax.set_xlabel(r'$K$')
ax.set_ylabel('AUC')
# ax.set_title('Scores by group and gender')
ax.set_xticks(x, labels)
# ax.legend()
ax.set_ylim(92, 98)
ax.bar_label(rects1, padding=4)
fig.tight_layout()
plt.show()
fig.savefig(Tools.new_dir("./result/figure/Abl_K.pdf"))
pass
def abl_c():
labels = ['20', '30', '40', '50', '60']
acc = [93.74, 96.35, 96.68, 96.15, 94.71]
x = np.arange(len(labels)) # the label locations
width = 0.5 # the width of the bars
fig, ax = plt.subplots(figsize=(4, 3))
rects1 = ax.bar(x, acc, width, label='AUC')
# line1 = ax.plot(x, acc, color="blue", linestyle='--', marker='o', linewidth=2, markersize=8)
# Add some text for labels, title and custom x-axis tick labels, etc.
ax.set_xlabel(r'$c_{num}$')
ax.set_ylabel('AUC')
# ax.set_title('Scores by group and gender')
ax.set_xticks(x, labels)
# ax.legend()
ax.set_ylim(92, 98)
ax.bar_label(rects1, padding=4)
fig.tight_layout()
plt.show()
fig.savefig(Tools.new_dir("./result/figure/Abl_C.pdf"))
pass
def abl_l():
labels = ['2', '4', '6', '8']
acc = [95.86, 96.21, 96.68, 95.16]
x = np.arange(len(labels)) # the label locations
width = 0.5 # the width of the bars
fig, ax = plt.subplots(figsize=(4, 3))
rects1 = ax.bar(x, acc, width, label='AUC')
# line1 = ax.plot(x, acc, color="blue", linestyle='--', marker='o', linewidth=2, markersize=8)
# Add some text for labels, title and custom x-axis tick labels, etc.
ax.set_xlabel(r'$The\ number\ of\ GNN\ layers$')
ax.set_ylabel('AUC')
# ax.set_title('Scores by group and gender')
ax.set_xticks(x, labels)
# ax.legend()
ax.set_ylim(92, 98)
ax.bar_label(rects1, padding=4)
fig.tight_layout()
plt.show()
fig.savefig(Tools.new_dir("./result/figure/Abl_L.pdf"))
pass
if __name__ == '__main__':
abl_k()
abl_c()
abl_l()
pass