From 7295530501d1058dbe278c8d4a3b16184d8fe030 Mon Sep 17 00:00:00 2001 From: Tr1xt4n Date: Tue, 28 Mar 2023 09:25:04 +0200 Subject: [PATCH] delay --- plot/main.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/plot/main.py b/plot/main.py index 0c0c740..f858958 100644 --- a/plot/main.py +++ b/plot/main.py @@ -45,6 +45,18 @@ def rb_available() -> np.ndarray: """ return available +def delay() -> np.ndarray: + delays = np.zeros((size, 2)) + nb = 0 + for i in nb_files: + data = pd.read_csv(".." + os.sep + "export" + os.sep + i, delimiter=';').to_numpy() + nb_users = i.split(".")[0] + d = data[:, 5] + for x in d: + delays[nb, 0] = int(nb_users) + delays[nb, 1] = float(x) + nb += 1 + return delays averages = mean_mkn() available = rb_available() @@ -65,4 +77,4 @@ 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() +plt.show() \ No newline at end of file