Entering edit mode
5.4 years ago
exin
▴
60
Newbie R question:
I currently use the standard blue-red palette for plotting a correlation plot:
> col<- colorRampPalette(c("blue", "white", "red"))(20)
but my data only covers a R value or ~0.2 to 1, hence white is set at ~0.4, which is misleading.
How do I select only "some blue and all red" of the spectrum, still with 20 divisions?
Undesired scale colours & associated plot: https://ibb.co/Hx6bzdM
can you provide the entire code you use for the heatmap generation, not just the color part? (different heatmap functions may have different capabilities of tuning the colors)
Here we go: