r - How to draw a straight line in heatmap plot -


i making heatmap data , want add straight line between each set of samples. seems abline doesn't work on heatmap.

any idea function can use purpose?

you have use add.expr argument. example found here might usefull:

x  <- as.matrix(mtcars) rc <- rainbow(nrow(x), start=0, end=.3) cc <- rainbow(ncol(x), start=0, end=.3) hv <- heatmap(x, col = cm.colors(256), scale="column",                rowsidecolors = rc, colsidecolors = cc, margin=c(5,10),                xlab = "specification variables", ylab= "car models",                main = "heatmap(<mtcars data>, ..., scale = \"column\")",                # important bit here                add.expr = abline(h=5, v=2)) 

Comments

Popular posts from this blog

c# - SelectList with Dictionary, add values to the Dictionary after it's assigned to SelectList -

how can i manage url using .htaccess in php? -

ios - I get the error Property '...' not found on object of type '...' -