Display plots in one window

This commit is contained in:
Quentin Legot 2023-03-31 12:04:57 +02:00
parent b78f9fc6b8
commit be44a1d098

View File

@ -57,23 +57,17 @@ delays.sort(axis=0)
# Data for plotting # Data for plotting
averages.sort(axis=0) averages.sort(axis=0)
fig, ax = plt.subplots() fig, ax = plt.subplots(2, 2)
ax.scatter(averages[:, 0], averages[:, 1]) ax[0, 0].scatter(averages[:, 0], averages[:, 1])
ax[0, 0].set(xlabel='number of users', ylabel='Efficacité spectrale', title='Efficacité spectrale')
ax[0, 0].grid()
ax.set(xlabel='number of users', ylabel='Efficacité spectrale', title='Efficacité spectrale') ax[0, 1].scatter(available[:, 0], available[:, 1])
ax.grid() ax[0, 1].set(xlabel='number of users', ylabel='RB utilisés', title='Pourcentage de RB utilisés')
ax[0, 1].grid()
# fig.savefig("test.png") ax[1, 0].scatter(delays[:, 0], delays[:, 1])
plt.show() ax[1, 0].set(xlabel='number of users', ylabel='delays(ms)', title='Delay')
ax[1, 0].grid()
fig, ax = plt.subplots() plt.show()
ax.scatter(available[:, 0], available[:, 1])
ax.set(xlabel='number of users', ylabel='RB utilisés', title='Pourcentage de RB utilisés')
ax.grid()
plt.show()
fig, ax = plt.subplots()
ax.scatter(delays[:, 0], delays[:, 1])
ax.set(xlabel='number of users', ylabel='delays(ms)', title='Delay')
ax.grid()
plt.show()