Commit 3ff23fad authored by Marcel Henrik Schubert's avatar Marcel Henrik Schubert
Browse files

fixed sns return error

parent 9969e6c7
......@@ -772,7 +772,7 @@ def plotter(subsets, subana, phases, labels):
#print([vocab[el] for el in ind_pos + ind_neg])
df = pd.DataFrame(tmp, index = [vocab[el].replace('§', '').encode('unicode-escape') for el in ind_pos + ind_neg])
f,ax = plt.subplots(figsize=(18, len(ind_pos+ind_neg)/6))
ax = sns.heatmap(df, fmt= '.1f',ax=ax, center = 0, yticklabels = True)
sns.heatmap(df, fmt= '.1f',ax=ax, center = 0, yticklabels = True)
f.savefig(savedir+'featureplots/features_heat_{}_{}_{}_phases.png'.format(st, an, label))
elif label == 'author':
......@@ -819,7 +819,7 @@ def plotter(subsets, subana, phases, labels):
#print([vocab[el] for el in ind_pos + ind_neg])
df = pd.DataFrame(tmp, index = [vocab[el].replace('§', '').encode('unicode-escape') for el in ind])
f,ax = plt.subplots(figsize=(18, len(ind_pos+ind_neg)/6))
ax = sns.heatmap(df, fmt= '.1f',ax=ax, center = 0, yticklabels = True)
sns.heatmap(df, fmt= '.1f',ax=ax, center = 0, yticklabels = True)
f.savefig(savedir+'featureplots/features_heat_{}_{}_{}_phases.png'.format(st, an, label))
dic = {}
......@@ -853,7 +853,7 @@ def plotter(subsets, subana, phases, labels):
ind = ind_pos+ind_neg
df = pd.DataFrame(tmp, index = [vocab[el].replace('§', '').encode('unicode-escape') for el in ind])
f,ax = plt.subplots(figsize=(18, len(ind_pos+ind_neg)/6))
ax = sns.heatmap(df, fmt= '.1f',ax=ax, center = 0, yticklabels = True)
sns.heatmap(df, fmt= '.1f',ax=ax, center = 0, yticklabels = True)
f.savefig(savedir+'featureplots/features_heat_{}_{}_{}_gender_phases.png'.format(st, an, label))
return 1
......
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