Skip to content

Commit

Permalink
add a plot function
Browse files Browse the repository at this point in the history
  • Loading branch information
abearab committed Oct 8, 2023
1 parent 4627dee commit a071f8d
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions gimaps/heatmap.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import PyComplexHeatmap as ch


def plot_heatmap(data,ax,leg=True,vmin=-.4, vmax=.4):
plot_cm = ch.ClusterMapPlotter(
data,
col_dendrogram=True,
row_dendrogram=True,
# left_annotation=col_ha,
vmin=vmin, vmax=vmax,
# center = 0,
# rasterized=True,
cmap = 'BlueYellow',
verbose=False,
legend=leg,legend_gap=1,
plot=False
# show_rownames=True,show_colnames=True
)
plot_cm.plot(ax=ax)
plot_cm.plot_legends(ax=ax)

return ax

0 comments on commit a071f8d

Please sign in to comment.