Commit 19b2c0eb authored by Marcel Henrik Schubert's avatar Marcel Henrik Schubert
Browse files

fixed plot ratio

parent fe65adbd
......@@ -754,7 +754,7 @@ def plotter(subsets, subana, phases, labels):
labels=['female', 'male'])
f = plt.figure()
ax = f.subplots()
plot_confusion_matrix(cnf_matrix, classes=phases,title=None, ax=ax)
plot_confusion_matrix(cnf_matrix, classes=['female', 'male'],title=None, ax=ax)
plt.tight_layout()
f.savefig(savedir+'heatmaps/cm_{st}_{an}_{label}_{group}.pdf'.format(st = st, an=an,
label=label,
......@@ -785,7 +785,7 @@ def plotter(subsets, subana, phases, labels):
labels=['female', 'male'])
f = plt.figure()
ax = f.subplots()
plot_confusion_matrix(cnf_matrix, classes=phases,title=None, ax=ax)
plot_confusion_matrix(cnf_matrix, classes=['female', 'male'],title=None, ax=ax)
plt.tight_layout()
f.savefig(savedir+'heatmaps/cm_{st}_{an}_{label}_{group}_false.pdf'.format(st = st, an=an,
label=label,
......@@ -799,11 +799,12 @@ def plotter(subsets, subana, phases, labels):
f= plt.figure(figsize=(10,5))
f= plt.figure(figsize=(5,10))
tmp_df =pd.DataFrame(tmp, index = index)
tmp_df.plot(kind='barh', colormap = cmap, ax=f.gca())
plt.legend(loc='center left', bbox_to_anchor=(1.0, 0.5)) #legend outside box
plt.ylabel(ylabel='Evaluation Measures for Different Subsets',fontsize ='large', fontweight='roman')
tmp_df.plot(kind='bar', colormap = cmap, ax=f.gca())
#plt.legend(loc='center left', bbox_to_anchor=(1.0, 0.5)) #legend outside box
plt.legend(loc='upper right')
plt.xlabel(xlabel='Evaluation Measures for Different Subsets',fontsize ='large', fontweight='roman')
plt.tight_layout()
plt.savefig(savedir+'barplots/overall_scores_{}_{}.pdf'.format(st, an))
plt.savefig(savedir+'barplots/overall_scores_{}_{}.png'.format(st, an))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment