Heatmap with contour and numbers
0
0
Entering edit mode
7.2 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!

Image panel D from Villar et al.

heatmap R • 3.2k views
ADD COMMENT
1
Entering edit mode

If I remember correct, there is an option trace in heatmap.2 function. May be you can play with it to get it done.

ADD REPLY
0
Entering edit mode

I tried trace. It only traces across rows or columns, but not the pattern in the heatmap. I will dig deeper though. Thank you!

ADD REPLY
0
Entering edit mode

Honestly, I don't really understand the plot, much less explain how you could do something similar in R/Python.

ADD REPLY
0
Entering edit mode

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

ADD REPLY
1
Entering edit mode

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!

ADD REPLY
1
Entering edit mode

did you try asking the author for information on how this was done?

ADD REPLY

Login before adding your answer.

Traffic: 3328 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6