From a32df7b8aa5b4e247eaaa4eaebfd3b2f12a34899 Mon Sep 17 00:00:00 2001 From: Langspielplatte Date: Tue, 11 Jul 2023 20:13:29 +0200 Subject: [PATCH] fix stacked --- plot_single_treansmission_paper.py | 27 ++------------------------- 1 file changed, 2 insertions(+), 25 deletions(-) diff --git a/plot_single_treansmission_paper.py b/plot_single_treansmission_paper.py index 4989db0..e66f649 100644 --- a/plot_single_treansmission_paper.py +++ b/plot_single_treansmission_paper.py @@ -220,22 +220,6 @@ if __name__ == "__main__": label="goodput", ) - # filter active state - for i in range(1, 5): - transmission_df["LTE_SCC{}_effective_bw".format(i)] = transmission_df["LTE_SCC{}_bw".format(i)] - - mask = transmission_df["LTE_SCC{}_state".format(i)].isin(["ACTIVE"]) - transmission_df["LTE_SCC{}_effective_bw".format(i)] = transmission_df[ - "LTE_SCC{}_effective_bw".format(i) - ].where(mask, other=0) - - # filter if sc is usesd for uplink - for i in range(1, 5): - mask = transmission_df["LTE_SCC{}_UL_Configured".format(i)].isin([False]) - transmission_df["LTE_SCC{}_effective_bw".format(i)] = transmission_df[ - "LTE_SCC{}_effective_bw".format(i) - ].where(mask, other=0) - # sum all effective bandwidth for 5G and 4G transmission_df["SCC1_NR5G_effective_bw"] = transmission_df["SCC1_NR5G_bw"].fillna(0) transmission_df["effective_bw_sum"] = ( @@ -246,14 +230,7 @@ if __name__ == "__main__": + transmission_df["LTE_SCC4_effective_bw"] + transmission_df["LTE_bw"] ) - bw_cols = [ - "SCC1_NR5G_effective_bw", - "LTE_bw", - "LTE_SCC1_effective_bw", - "LTE_SCC2_effective_bw", - "LTE_SCC3_effective_bw", - "LTE_SCC4_effective_bw", - ] + bw_cols = ["nr_effective_bw_sum", "lte_effective_bw_sum"] ax_stacked = transmission_df[bw_cols].plot.area(stacked=True, linewidth=0, ax=ax00) ax00.set_ylabel("bandwidth [MHz]") @@ -290,7 +267,7 @@ if __name__ == "__main__": #ax0.set_zorder(100) lns_ax00 = [ax_stacked] - labs_ax00 = [l.get_label() for l in lns_ax00] + labs_ax00 = ["5G bandwidth", "4G bandwidth"] ax00.legend(lns_ax00, labs_ax00, ncols=3, fontsize=9, loc="upper center", frameon=legend_frame) #ax00.set_zorder(100) plt.savefig("{}{}_plot.eps".format(args.save, csv.replace(".csv", "")), bbox_inches="tight")