Skip to content
Snippets Groups Projects
Commit 8028a6b0 authored by Jammer, Tim's avatar Jammer, Tim
Browse files

added plots optimized for presentation on slides

parent 26377087
No related branches found
No related tags found
No related merge requests found
...@@ -1560,6 +1560,45 @@ def get_overview_plot(data, outpath,scrutiny="base"): ...@@ -1560,6 +1560,45 @@ def get_overview_plot(data, outpath,scrutiny="base"):
plt.savefig(os.path.join(outpath, "overview_per_cat.pdf"), bbox_inches="tight") plt.savefig(os.path.join(outpath, "overview_per_cat.pdf"), bbox_inches="tight")
# split plots in different pdfs
fig, ax = plt.subplots(figsize=(8, 4))
df_p2p[["TP", "TN", "FP", "FN", "RE", "CE"]].plot.barh(stacked=True, ax=ax, legend=False, color=colors)
ax1.set_title('P2P')
handles, labels = ax.get_legend_handles_labels()
fig.legend(handles, labels, loc='upper center', ncols=1, bbox_to_anchor=(1.065, 0.9), )
plt.tight_layout()
ax.set_yticklabels([label.get_text().upper() for label in ax.get_yticklabels()])
plt.savefig(os.path.join(outpath, "overview_P2P.pdf"), bbox_inches="tight")
fig, ax = plt.subplots(figsize=(8, 4))
df_coll[["TP", "TN", "FP", "FN", "RE", "CE"]].plot.barh(stacked=True, ax=ax, legend=False, color=colors)
ax1.set_title('COLL')
handles, labels = ax.get_legend_handles_labels()
fig.legend(handles, labels, loc='upper center', ncols=1, bbox_to_anchor=(1.065, 0.9), )
plt.tight_layout()
ax.set_yticklabels([label.get_text().upper() for label in ax.get_yticklabels()])
plt.savefig(os.path.join(outpath, "overview_COLL.pdf"), bbox_inches="tight")
fig, ax = plt.subplots(figsize=(8, 4))
df_rma[["TP", "TN", "FP", "FN", "RE", "CE"]].plot.barh(stacked=True, ax=ax, legend=False, color=colors)
ax1.set_title('RMA')
handles, labels = ax.get_legend_handles_labels()
fig.legend(handles, labels, loc='upper center', ncols=1, bbox_to_anchor=(1.065, 0.9), )
plt.tight_layout()
ax.set_yticklabels([label.get_text().upper() for label in ax.get_yticklabels()])
plt.savefig(os.path.join(outpath, "overview_RMA.pdf"), bbox_inches="tight")
fig, ax = plt.subplots(figsize=(8, 4))
df_total[["TP", "TN", "FP", "FN", "RE", "CE"]].plot.barh(stacked=True, ax=ax, legend=False, color=colors)
ax1.set_title('ALL')
handles, labels = ax.get_legend_handles_labels()
fig.legend(handles, labels, loc='upper center', ncols=1, bbox_to_anchor=(1.065, 0.9), )
plt.tight_layout()
ax.set_yticklabels([label.get_text().upper() for label in ax.get_yticklabels()])
plt.savefig(os.path.join(outpath, "overview_ALL.pdf"), bbox_inches="tight")
######################## ########################
# cmd_plots(): what to do when '-c plots' is used (extract the statistics of this tool) # cmd_plots(): what to do when '-c plots' is used (extract the statistics of this tool)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment