fix stacked
This commit is contained in:
@@ -220,22 +220,6 @@ if __name__ == "__main__":
|
|||||||
label="goodput",
|
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
|
# sum all effective bandwidth for 5G and 4G
|
||||||
transmission_df["SCC1_NR5G_effective_bw"] = transmission_df["SCC1_NR5G_bw"].fillna(0)
|
transmission_df["SCC1_NR5G_effective_bw"] = transmission_df["SCC1_NR5G_bw"].fillna(0)
|
||||||
transmission_df["effective_bw_sum"] = (
|
transmission_df["effective_bw_sum"] = (
|
||||||
@@ -246,14 +230,7 @@ if __name__ == "__main__":
|
|||||||
+ transmission_df["LTE_SCC4_effective_bw"]
|
+ transmission_df["LTE_SCC4_effective_bw"]
|
||||||
+ transmission_df["LTE_bw"]
|
+ transmission_df["LTE_bw"]
|
||||||
)
|
)
|
||||||
bw_cols = [
|
bw_cols = ["nr_effective_bw_sum", "lte_effective_bw_sum"]
|
||||||
"SCC1_NR5G_effective_bw",
|
|
||||||
"LTE_bw",
|
|
||||||
"LTE_SCC1_effective_bw",
|
|
||||||
"LTE_SCC2_effective_bw",
|
|
||||||
"LTE_SCC3_effective_bw",
|
|
||||||
"LTE_SCC4_effective_bw",
|
|
||||||
]
|
|
||||||
|
|
||||||
ax_stacked = transmission_df[bw_cols].plot.area(stacked=True, linewidth=0, ax=ax00)
|
ax_stacked = transmission_df[bw_cols].plot.area(stacked=True, linewidth=0, ax=ax00)
|
||||||
ax00.set_ylabel("bandwidth [MHz]")
|
ax00.set_ylabel("bandwidth [MHz]")
|
||||||
@@ -290,7 +267,7 @@ if __name__ == "__main__":
|
|||||||
#ax0.set_zorder(100)
|
#ax0.set_zorder(100)
|
||||||
|
|
||||||
lns_ax00 = [ax_stacked]
|
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.legend(lns_ax00, labs_ax00, ncols=3, fontsize=9, loc="upper center", frameon=legend_frame)
|
||||||
#ax00.set_zorder(100)
|
#ax00.set_zorder(100)
|
||||||
plt.savefig("{}{}_plot.eps".format(args.save, csv.replace(".csv", "")), bbox_inches="tight")
|
plt.savefig("{}{}_plot.eps".format(args.save, csv.replace(".csv", "")), bbox_inches="tight")
|
||||||
|
|||||||
Reference in New Issue
Block a user