I plotted a heatmap
I want cancer to be red and healthy to be blue
pheatmap(heat1, annotation_col=df,color=colorRampPalette(c("navy", "white", "red"))(50))
You are seeing cancer is in blue in annotation, how I can change that
It is possible with annotation_colors
argument :
First create a list with your conditions and then add the argument :
annot_colors=list(HealthStatus=c(Cancer="#F0978D",Healthy="#63D7DE"))
pheatmap(heat1,
annotation_col=df,
color=colorRampPalette(c("navy", "white", "red"))(50),
annotation_colors=annot_colors)