From 0dfc17f9505b03e95c1c1c6d2bd73cfd07f5befc Mon Sep 17 00:00:00 2001 From: Langspielplatte Date: Tue, 11 Jul 2023 09:25:14 +0200 Subject: [PATCH] Legend fixes --- plot_single_transmission_EM9190.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plot_single_transmission_EM9190.py b/plot_single_transmission_EM9190.py index 6ef2645..4a9d79c 100755 --- a/plot_single_transmission_EM9190.py +++ b/plot_single_transmission_EM9190.py @@ -312,12 +312,13 @@ if __name__ == "__main__": ax01.set_ylabel("Bandwidth [MHz]") if args.fancy: + legend_frame = False ax0.set_xlim([0, transmission_df.index[-1]]) ax00.set_xlim([0, transmission_df.index[-1]]) # added these three lines lns_ax0 = snd_plot + srtt_plot + goodput_plot labs_ax0 = [l.get_label() for l in lns_ax0] - ax0.legend(lns_ax0, labs_ax0, ncols=9, fontsize=9, loc="upper center") + ax0.legend(lns_ax0, labs_ax0, ncols=9, fontsize=9, loc="upper center", frameon=legend_frame).set_zorder(104) #ax0.set_zorder(100) lns_ax00 = eff_bw_plot + lte_eff_bw_plot + nr_eff_bw_plot + lte_rsrq_plot + nr_rsrq_plot @@ -326,7 +327,7 @@ if __name__ == "__main__": if nr_hanover_plot: lns_ax00.append(nr_hanover_plot) labs_ax00 = [l.get_label() for l in lns_ax00] - ax00.legend(lns_ax00, labs_ax00, ncols=3, fontsize=9, loc="upper center") + ax00.legend(lns_ax00, labs_ax00, ncols=3, fontsize=9, loc="upper center", frameon=legend_frame).set_zorder(104) #ax00.set_zorder(100) plt.savefig("{}{}_plot.eps".format(args.save, csv.replace(".csv", "")), bbox_inches="tight") else: