update graph and table
This commit is contained in:
parent
c62d2d0054
commit
2c6284e1bf
@ -31,4 +31,21 @@ for f in Path('wos-data-compete').iterdir():
|
|||||||
|
|
||||||
result[name] = survivals
|
result[name] = survivals
|
||||||
|
|
||||||
print(json.dumps(result))
|
# print(json.dumps(result))
|
||||||
|
|
||||||
|
average = [0]*20
|
||||||
|
for k, v in result.items():
|
||||||
|
for r, l in v.items():
|
||||||
|
average[int(r)] += len(l)
|
||||||
|
|
||||||
|
for i in range(20):
|
||||||
|
average[i] /= len(result)
|
||||||
|
|
||||||
|
idx=[]
|
||||||
|
s=[]
|
||||||
|
for i in range(1,16):
|
||||||
|
idx.append(str(i))
|
||||||
|
s.append("%.1f"%average[i])
|
||||||
|
|
||||||
|
print(" & ".join(idx))
|
||||||
|
print(" & ".join(s))
|
||||||
|
|||||||
@ -44,8 +44,8 @@ def p1(x, coopr, crawx, crawy, postfix, show=True):
|
|||||||
ax.set_xlabel("Rounds", size=11)
|
ax.set_xlabel("Rounds", size=11)
|
||||||
ax.set_ylabel(r"f$_{\rm c}$", size=11, fontstyle='normal')
|
ax.set_ylabel(r"f$_{\rm c}$", size=11, fontstyle='normal')
|
||||||
ax.yaxis.grid(True, linestyle='--')
|
ax.yaxis.grid(True, linestyle='--')
|
||||||
# if postfix == 'SURVIVE':
|
if postfix == 'SURVIVE':
|
||||||
# ax.legend(loc='upper center', fontsize=10, ncol=1)
|
ax.legend(loc='upper center', fontsize=10, ncol=3)
|
||||||
|
|
||||||
plt.tight_layout()
|
plt.tight_layout()
|
||||||
if show:
|
if show:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user