Christina Theodoris
commited on
Commit
•
badcca6
1
Parent(s):
d154fee
Rename heatmap legend to be correct label
Browse files
examples/extract_and_plot_cell_embeddings.ipynb
CHANGED
The diff for this file is too large to render.
See raw diff
|
|
geneformer/emb_extractor.py
CHANGED
@@ -198,11 +198,9 @@ def plot_heatmap(embs_df, emb_dims, label, output_file, kwargs_dict):
|
|
198 |
|
199 |
plt.setp(g.ax_row_colors.get_xmajorticklabels(), rotation=45, ha="right")
|
200 |
|
201 |
-
for
|
202 |
-
g.ax_col_dendrogram.bar(0, 0, color=label_color_dict[
|
203 |
|
204 |
-
# g.ax_col_dendrogram.set_visible(False)
|
205 |
-
# g.ax_col_dendrogram.set_xlim([0,0])
|
206 |
l1 = g.ax_col_dendrogram.legend(title=f"{label}",
|
207 |
loc="lower center",
|
208 |
ncol=4,
|
|
|
198 |
|
199 |
plt.setp(g.ax_row_colors.get_xmajorticklabels(), rotation=45, ha="right")
|
200 |
|
201 |
+
for label_color in list(label_color_dict.keys()):
|
202 |
+
g.ax_col_dendrogram.bar(0, 0, color=label_color_dict[label_color], label=label_color, linewidth=0)
|
203 |
|
|
|
|
|
204 |
l1 = g.ax_col_dendrogram.legend(title=f"{label}",
|
205 |
loc="lower center",
|
206 |
ncol=4,
|