From 31f767da99d8d1cde2239b235c3ec82a869658b1 Mon Sep 17 00:00:00 2001 From: Tim Jammer <tim.jammer@tu-darmstadt.de> Date: Wed, 31 Jul 2024 18:49:58 +0200 Subject: [PATCH] change plot colorsceme --- scripts/result_plot.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/result_plot.py b/scripts/result_plot.py index 22185325a..b62b5ae83 100644 --- a/scripts/result_plot.py +++ b/scripts/result_plot.py @@ -52,10 +52,14 @@ plt.rc('figure', titlesize=BIGGER_SIZE) # fontsize of the figure title fig, axs = plt.subplots(nrows=2, ncols=2, figsize=(16, 9)) # -colors = ['#228833', '#66ccee', '#ee6677', '#aa3377', '#ccbb44', '#bbbbbb'] +#colors = ['#228833', '#66ccee', '#ee6677', '#aa3377', '#ccbb44', '#bbbbbb'] +colors = ['#6699CC', '#EECC66', '#004488', '#997700', '#BBBBBB', '#000000'] +colors_2 = {'TP': '#117733', 'TN': '#88CCEE', 'FP': '#CC6677', 'FN': '#AA4499', 'RE': '#DDCC77', 'CE': '#DDDDDD'} + +hatches= ["","",".",".","",""] ((ax1, ax2), (ax3, ax4)) = axs -df_p2p[["TP", "TN", "FP", "FN", "RE", "CE"]].plot.barh(stacked=True, ax=ax1, legend=False, color=colors) +df_p2p[["TP", "TN", "FP", "FN", "RE", "CE"]].plot.barh(stacked=True, ax=ax1, legend=False,color=colors) ax1.set_title('P2P') handles, labels = ax1.get_legend_handles_labels() @@ -80,4 +84,5 @@ for ax in [ax1, ax2, ax3, ax4]: fig.legend(handles, labels, loc='upper center', ncols=6, bbox_to_anchor=(0.5, 1.05), ) plt.tight_layout() + plt.savefig(os.path.join(plot_path, "results_per_cat.pdf"), bbox_inches="tight") -- GitLab