diff --git a/scripts/result_plot.py b/scripts/result_plot.py index 22185325ab92d8ae7056035c0e36c6e6d2592540..b62b5ae835dba524d862eecc5ef9e8001285faf3 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")