Frederick commited on
Commit
5879aaa
·
1 Parent(s): 0d8c067

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -0
app.py CHANGED
@@ -150,6 +150,7 @@ def label_visualization(clause2labels):
150
  boundedness_dict = {"Static": boundedness_labels.count("static"), "Episodic": boundedness_labels.count("episodic"), "Habitual": boundedness_labels.count("habitual"), "NA": boundedness_labels.count("NA")}
151
  print(aspect_dict, genericity_dict, boundedness_dict)
152
  fig, axs = plt.subplots(1, 3, figsize=(10, 6,))
 
153
  axs[0].pie([float(v / total_clauses) for v in aspect_dict.values()], colors = sns.color_palette('pastel')[0:3], labels=aspect_dict.keys(), autopct='%.0f%%', normalize=True )
154
  axs[0].set_title("Aspect")
155
  axs[1].pie([float(v / total_clauses) for v in genericity_dict.values()], colors = sns.color_palette('pastel')[3:6], labels=genericity_dict.keys(), autopct='%.0f%%', normalize=True)
 
150
  boundedness_dict = {"Static": boundedness_labels.count("static"), "Episodic": boundedness_labels.count("episodic"), "Habitual": boundedness_labels.count("habitual"), "NA": boundedness_labels.count("NA")}
151
  print(aspect_dict, genericity_dict, boundedness_dict)
152
  fig, axs = plt.subplots(1, 3, figsize=(10, 6,))
153
+ fig.tight_layout(pad=5.0)
154
  axs[0].pie([float(v / total_clauses) for v in aspect_dict.values()], colors = sns.color_palette('pastel')[0:3], labels=aspect_dict.keys(), autopct='%.0f%%', normalize=True )
155
  axs[0].set_title("Aspect")
156
  axs[1].pie([float(v / total_clauses) for v in genericity_dict.values()], colors = sns.color_palette('pastel')[3:6], labels=genericity_dict.keys(), autopct='%.0f%%', normalize=True)