ggplot2 heatmap with colors for ranged values
It’s not clear if you want discrete colors or if the colors you list are just markers along the range of Y. I’ll show both. For discrete colors, use Y1 as joran defines it dat$Y1 <- cut(dat$Y,breaks = c(-Inf,-3:3,Inf),right = FALSE) Then you can get a plot with the specific colors you list using a … Read more