Entering edit mode
7.1 years ago
urjaswita
▴
100
I'm not sure if this is a good fit on this forum, but I guess graphics is an integral part of bioinformatics, so here goes. I wish to create a heatmap like the one in panel D in this figure. I could plot the heatmap easily, but I couldn't find how to put the contour lines and numbers on it. Is there a package/command in R/Python or maybe they wrote a custom script. Any help is much appreciated. Thanks!
If I remember correct, there is an option
trace
inheatmap.2
function. May be you can play with it to get it done.I tried trace. It only traces across rows or columns, but not the pattern in the heatmap. I will dig deeper though. Thank you!
Honestly, I don't really understand the plot, much less explain how you could do something similar in R/Python.
How did you plot it so far? - using
contourplot()
in lattice? countourplot will draw the line automatically.Take a look here, where you may be able to re-use some code: http://r.789695.n4.nabble.com/Triangular-filled-contour-plot-td1557386.html
I tried heatmap.2 and pheatmap in R. Both created a nice heatmap, but I couldn't find an option to get contour lines and numbers.
I'll check the lattice. Thanks!
did you try asking the author for information on how this was done?