Skip to content

Commit

Permalink
Update _plot.py Legend option off paired
Browse files Browse the repository at this point in the history
  • Loading branch information
andy6a authored Jul 9, 2024
1 parent 56f7b0f commit b36e19f
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions sourcetracker/_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def ST_heatmap(self, keep_unknowns=True, annot=True,

def ST_paired_heatmap(self, normalized=False, keep_unknowns=True,
transpose=False, annot=True, ylabel='Sinks',
heat_ratio=0.08):
heat_ratio=0.08, legend=True):
"""
Parameters
----------
Expand Down Expand Up @@ -166,10 +166,15 @@ def ST_paired_heatmap(self, normalized=False, keep_unknowns=True,
g[i].set_yticks([])
g[i].set_title(self.title)
elif i == len(prop.columns) - 1:
g[i] = sns.heatmap(prop.iloc[:, i:i + 1], vmin=0,
cmap=self.color, annot=annot,
ax=axes[i],
cbar_ax=axes[i + 1])
if legend:
g[i] = sns.heatmap(prop.iloc[:, i:i + 1], vmin=0,
cmap=self.color, annot=annot,
ax=axes[i],
cbar_ax=axes[i + 1])
else:
g[i] = sns.heatmap(prop.iloc[:, i:i + 1], vmin=0,
cmap=self.color, annot=annot,
ax=axes[i])
g[i].set_xlabel("")
g[i].set_ylabel("")
g[i].set_yticks([])
Expand Down

0 comments on commit b36e19f

Please sign in to comment.