vickeee465 commited on
Commit
46a7d7d
·
1 Parent(s): 0efc44c

use greys for heatmap cmap

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -90,7 +90,7 @@ def prepare_heatmap_data(data):
90
  return heatmap_data
91
 
92
 
93
- def plot_emotion_heatmap(heatmap_data, cmap="viridis"):
94
  heatmap_data = heatmap_data.T
95
 
96
  fig = plt.figure(figsize=(len(heatmap_data.columns) * 0.5 + 4, len(heatmap_data.index) * 0.5 + 2))
@@ -108,7 +108,7 @@ def plot_emotion_heatmap(heatmap_data, cmap="viridis"):
108
 
109
  plt.xlabel("Emotions")
110
  plt.ylabel("Sentences")
111
- plt.xticks(rotation=0, ha='right')
112
  plt.yticks(rotation=0)
113
  plt.tight_layout()
114
 
 
90
  return heatmap_data
91
 
92
 
93
+ def plot_emotion_heatmap(heatmap_data, cmap="Greys_r"):
94
  heatmap_data = heatmap_data.T
95
 
96
  fig = plt.figure(figsize=(len(heatmap_data.columns) * 0.5 + 4, len(heatmap_data.index) * 0.5 + 2))
 
108
 
109
  plt.xlabel("Emotions")
110
  plt.ylabel("Sentences")
111
+ plt.xticks(rotation=0, ha='center')
112
  plt.yticks(rotation=0)
113
  plt.tight_layout()
114