R - d3heatmap color palette, 2-sided -


i trying create heatmap using d3heatmap package colors

red values below -2 yellow between -2 , -1.65 green between -1.65 , 1.65 yellow again between 1.65 , 2 red above 2 

i have used search , found solutions palette 1-sided palette. not sure whether problem, using:

d3heatmap(mydata,      dendrogram = "none",     colors = c("red", "yellow", "green", "yellow", "red"),     breaks = c(seq(-10, -2), seq(-2, -1.65), seq(-1.65, 1.65), seq(1.65, 2), seq(2, 10)),  ) 

(there no values above 10)

unfortunately, yields funny results not understand colors in heatmap, e.g. yellow 0.125 or green 1.69. tried varying length of colors-sequences , colorramppalette similar results.


Comments

Popular posts from this blog

c# - Binding a comma separated list to a List<int> in asp.net web api -

Delphi 7 and decode UTF-8 base64 -

html - Is there any way to exclude a single element from the style? (Bootstrap) -