Adds fancy legend.
This commit is contained in:
@@ -10,6 +10,7 @@ import pandas as pd
|
|||||||
import matplotlib.pyplot as plt
|
import matplotlib.pyplot as plt
|
||||||
|
|
||||||
import seaborn as sns
|
import seaborn as sns
|
||||||
|
|
||||||
sns.set()
|
sns.set()
|
||||||
|
|
||||||
tex_fonts = {
|
tex_fonts = {
|
||||||
@@ -25,6 +26,7 @@ tex_fonts = {
|
|||||||
"mathtext.fontset": "dejavusans",
|
"mathtext.fontset": "dejavusans",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
# plt.rcParams.update(tex_fonts)
|
# plt.rcParams.update(tex_fonts)
|
||||||
|
|
||||||
|
|
||||||
@@ -178,7 +180,8 @@ if __name__ == "__main__":
|
|||||||
+ transmission_df["LTE_bw"].fillna(0))
|
+ transmission_df["LTE_bw"].fillna(0))
|
||||||
transmission_df["nr_effective_bw_sum"] = transmission_df["SCC1_NR5G_effective_bw"]
|
transmission_df["nr_effective_bw_sum"] = transmission_df["SCC1_NR5G_effective_bw"]
|
||||||
|
|
||||||
transmission_df["effective_bw_sum"] = transmission_df["nr_effective_bw_sum"] + transmission_df["lte_effective_bw_sum"]
|
transmission_df["effective_bw_sum"] = transmission_df["nr_effective_bw_sum"] + transmission_df[
|
||||||
|
"lte_effective_bw_sum"]
|
||||||
|
|
||||||
# transmission timeline
|
# transmission timeline
|
||||||
scaley = 1.5
|
scaley = 1.5
|
||||||
@@ -309,16 +312,19 @@ if __name__ == "__main__":
|
|||||||
ax01.set_ylabel("Bandwidth [MHz]")
|
ax01.set_ylabel("Bandwidth [MHz]")
|
||||||
|
|
||||||
if args.fancy:
|
if args.fancy:
|
||||||
|
ax0.set_xlim([0, transmission_df.index[-1]])
|
||||||
|
ax00.set_xlim([0, transmission_df.index[-1]])
|
||||||
# added these three lines
|
# added these three lines
|
||||||
lns_ax0 = snd_plot + srtt_plot + goodput_plot
|
lns_ax0 = snd_plot + srtt_plot + goodput_plot
|
||||||
labs_ax0 = [l.get_label() for l in lns_ax0]
|
labs_ax0 = [l.get_label() for l in lns_ax0]
|
||||||
ax0.legend(lns_ax0, labs_ax0, ncols=4, fontsize=12, loc="upper center")
|
ax0.legend(lns_ax0, labs_ax0, ncols=4, fontsize=12, loc="upper center")
|
||||||
|
|
||||||
lns_ax00 = eff_bw_plot + lte_eff_bw_plot + nr_eff_bw_plot + lte_rsrq_plot + nr_rsrq_plot
|
lns_ax00 = eff_bw_plot + lte_eff_bw_plot + nr_eff_bw_plot + lte_rsrq_plot + nr_rsrq_plot
|
||||||
if lte_hanover_plot:
|
if lte_hanover_plot:
|
||||||
lns_ax00.append(lte_hanover_plot)
|
lns_ax00.append(lte_hanover_plot)
|
||||||
if nr_hanover_plot:
|
if nr_hanover_plot:
|
||||||
lns_ax00.append(nr_hanover_plot)
|
lns_ax00.append(nr_hanover_plot)
|
||||||
labs_ax00 = [l.get_label() for l in lns_ax0]
|
labs_ax00 = [l.get_label() for l in labs_ax00]
|
||||||
ax00.legend(lns_ax00, labs_ax00, ncols=4, fontsize=12, loc="upper center")
|
ax00.legend(lns_ax00, labs_ax00, ncols=4, fontsize=12, loc="upper center")
|
||||||
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")
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user