For 1.10
This commit is contained in:
parent
8f1a9da50d
commit
cb51d29301
@ -36,12 +36,14 @@ colors = cm.get_cmap('OrRd')
|
||||
colors.set_bad('white')
|
||||
ax.set_xticklabels(np.arange(1, 46, 11))
|
||||
dct = ax.imshow(ndata, cmap=colors, origin='lower')#, norm=colors.LogNorm())
|
||||
|
||||
ax.plot(np.arange(7, 45), np.floor(45 / np.arange(8, 46)),
|
||||
marker='x', color='black', markersize=3, linestyle='none', markeredgewidth=0.5)
|
||||
sc = ax.scatter(np.arange(7, 45), np.floor(45 / np.arange(8, 46)), s=20, facecolors='none', edgecolors='black', linewidths=0.75, linestyle='dotted', label='Maximal number of opponents')
|
||||
plt.legend()
|
||||
# ax2 = ax.twinx()
|
||||
# ax2.set_ylabel("Maximal Number of opponents")
|
||||
ax.set_xlabel("Decision time")
|
||||
ax.set_ylabel("Number of opponents")
|
||||
ax.set_ylabel("Number of partners")
|
||||
fig.colorbar(dct, ax=ax, orientation='horizontal', aspect=40)
|
||||
|
||||
# plt.show()
|
||||
# print(plt.rcParams)
|
||||
plt.savefig('graph/decision_time.eps')
|
||||
|
||||
29
theta_plot.py
Normal file
29
theta_plot.py
Normal file
@ -0,0 +1,29 @@
|
||||
import numpy as np
|
||||
from matplotlib import pyplot as plt
|
||||
import scipy as sp
|
||||
from matplotlib import markers
|
||||
blue = '#0984e3'
|
||||
red = '#d63031'
|
||||
|
||||
x = np.arange(1, 16)
|
||||
tc = np.loadtxt("outputs/EID_CLASSIC.csv", delimiter=',')
|
||||
ts = np.loadtxt("outputs/EID_SURVIVE.csv", delimiter=',')
|
||||
|
||||
fig = plt.figure(figsize=(6,4.5))
|
||||
ax = fig.gca()
|
||||
ax.plot(x[:-1], tc[:-1], 'o--', color='limegreen', linewidth=2, label=r"Classic")
|
||||
ax.plot(x[:-1], ts[:-1], 'o-', color='darkorange', linewidth=2, label=r"Dissipative")
|
||||
|
||||
ax.set_ylim(-1500, 500)
|
||||
ax.set_yticks(sp.linspace(-1500, 500, 6))
|
||||
ax.tick_params(labelsize=14)
|
||||
ax.set_xlim(1, 15)
|
||||
ax.set_xticks(sp.linspace(1,15,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")
|
||||
Loading…
Reference in New Issue
Block a user