From 7831bc2d2b8a19ac60adebd19481c11786fe65af Mon Sep 17 00:00:00 2001 From: Quentin Legot Date: Fri, 31 Mar 2023 12:04:57 +0200 Subject: [PATCH] Display plots in one window --- plot/main.py | 28 +++++++++++----------------- 1 file changed, 11 insertions(+), 17 deletions(-) diff --git a/plot/main.py b/plot/main.py index a666898..8d7118f 100644 --- a/plot/main.py +++ b/plot/main.py @@ -57,23 +57,17 @@ delays.sort(axis=0) # Data for plotting averages.sort(axis=0) -fig, ax = plt.subplots() -ax.scatter(averages[:, 0], averages[:, 1]) +fig, ax = plt.subplots(2, 2) +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.grid() +ax[0, 1].scatter(available[:, 0], available[:, 1]) +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") -plt.show() +ax[1, 0].scatter(delays[:, 0], delays[:, 1]) +ax[1, 0].set(xlabel='number of users', ylabel='delays(ms)', title='Delay') +ax[1, 0].grid() -fig, ax = plt.subplots() -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() +plt.show() \ No newline at end of file