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

javascript - Unusual behaviour when drawing lots of images onto a large canvas -

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

javascript - Chart.js - setting tooltip z-index -