소스 검색

fix stacked

master
langspielplatte 2 년 전
부모
커밋
a32df7b8aa
1개의 변경된 파일2개의 추가작업 그리고 25개의 파일을 삭제
  1. +2
    -25
      plot_single_treansmission_paper.py

+ 2
- 25
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")

Loading…
취소
저장