32 lines
985 B
Python
32 lines
985 B
Python
import numpy as np
|
|
from matplotlib import pyplot as plt
|
|
import scipy as sp
|
|
from matplotlib import markers
|
|
blue = '#0984e3'
|
|
red = '#d63031'
|
|
|
|
MAX_ROUND = 16 # = game_end_at + 1
|
|
x = np.arange(1, MAX_ROUND+1)
|
|
tc = np.loadtxt("outputs/EID_NEW_BA.csv", delimiter=',')
|
|
ts = np.loadtxt("outputs/EID_NEW_WS.csv", delimiter=',')
|
|
|
|
fig = plt.figure(figsize=(6,4.5))
|
|
ax = fig.gca()
|
|
ax.plot(x[:-3], tc[:-3], 'o--', color='limegreen', linewidth=2, label=r"BA")
|
|
ax.plot(x[:-1], ts[:-1], 'o-', color='darkorange', linewidth=2, label=r"WS")
|
|
|
|
# ax.set_ylim(-1500, 500)
|
|
# ax.set_yticks(sp.linspace(-1500, 500, 6))
|
|
ax.tick_params(labelsize=14)
|
|
ax.set_xlim(1, MAX_ROUND)
|
|
ax.set_xticks(sp.linspace(1,MAX_ROUND-1,8, dtype=int))
|
|
ax.set_xlabel("Rounds", size=22)
|
|
ax.set_ylabel(r"$\theta$", family='sans-serif', size=22)
|
|
# ax.tick_params(axis='y', labelcolor=red)
|
|
|
|
plt.legend(numpoints=2, fontsize=14)
|
|
plt.tight_layout()
|
|
# plt.show()
|
|
# plt.savefig("graph/theta_plot.eps")
|
|
plt.savefig("graph/theta_plot_new.pdf")
|