for 1.12
This commit is contained in:
parent
3081eabbb4
commit
db12e5dae3
@ -44,6 +44,7 @@ ax.set_xticks(index + bar_width / 2)
|
||||
ax.set_xticklabels(('C', 'D'))
|
||||
ax.set_xlabel('Previous Move')
|
||||
ax.set_ylim(0,100)
|
||||
ax.tick_params(direction='in')
|
||||
ax.legend(loc='upper left')
|
||||
fig.tight_layout()
|
||||
# plt.show()
|
||||
|
||||
@ -27,6 +27,8 @@ def p1(x, coopr, e, postfix, show=True):
|
||||
ax.tick_params(axis='y', labelcolor=blue)
|
||||
ax2.set_ylabel(r"$\theta$", family='sans-serif', color=red, size=22)
|
||||
ax2.tick_params(axis='y', labelcolor=red)
|
||||
ax.tick_params(direction='in')
|
||||
ax2.tick_params(direction='in')
|
||||
|
||||
plt.tight_layout()
|
||||
if show:
|
||||
@ -56,6 +58,7 @@ def p2(e, coopr, postfix, show=True, showline=True):
|
||||
ax.tick_params(labelsize=14)
|
||||
ax.set_ylim(0.6, 1)
|
||||
ax.set_yticks(sp.linspace(0.6, 1, 5))
|
||||
ax.tick_params(direction='in')
|
||||
plt.tight_layout()
|
||||
if show:
|
||||
plt.show()
|
||||
|
||||
@ -8,13 +8,15 @@ blue = '#0984e3'
|
||||
red = '#d63031'
|
||||
|
||||
def p1(x, coopr, postfix, show=True):
|
||||
fig = plt.figure(figsize=(4.5, 3))
|
||||
fig = plt.figure(figsize=(4.5, 2))
|
||||
ax = fig.gca()
|
||||
ax.plot(x, coopr, 'o-', color=blue, linewidth=2, label="$f_c$")
|
||||
ax.set_ylim(0, 1)
|
||||
ax.set_yticks(sp.linspace(0, 1, 5))
|
||||
ax.set_ylim(0.5, 1)
|
||||
ax.set_yticks(sp.linspace(0.5, 1, 5))
|
||||
ax.tick_params(labelsize=18)
|
||||
ax.tick_params(direction='in')
|
||||
ax.set_xlim(0, 16)
|
||||
# ax.set_xticklabels([''])
|
||||
ax.set_xlabel("Rounds", size=22)
|
||||
ax.set_ylabel(r"$f_c$", family='sans-serif', size=22)
|
||||
ax.yaxis.grid(True, linestyle='--')
|
||||
|
||||
@ -83,6 +83,7 @@ if __name__ == '__main__':
|
||||
ax.set_xticklabels(['C', 'D'])
|
||||
ax.set_ylim(-6, 6)
|
||||
ax.set_xlabel("Previous Move")
|
||||
ax.tick_params(direction='in')
|
||||
ax.legend([hdl1, hdl2], labels, ncol=2)
|
||||
|
||||
fig.tight_layout()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user