Third, Intermediate color using gheatmap

24 views
Skip to first unread message

Tucker Heptinstall

unread,
Nov 3, 2023, 10:58:21 AM11/3/23
to ggtree
Is there a way to specify an intermediate color using gheatmap for continuous variables?

I have a specified high value color of yellow and a low value color of blue, but I would like intermediate values to be colored green with a blended range between them. Is that possible?

helio quintero arrieta

unread,
Nov 10, 2025, 10:03:28 PM (12 days ago) Nov 10
to ggtree
I think you can specify as many as you want. With something like 

  gheatmap(p, df,
           offset = 0.3,
           width = 0.5,
           font.size = 3,
           colnames_angle = 90) +
  scale_fill_gradientn(
    colors = c("white", "lightblue", "blue")
  )
Reply all
Reply to author
Forward
0 new messages