Color key in Heatmap.plus package
0
1
Entering edit mode
8.3 years ago
Ron ★ 1.2k

I am using following code to generate a heat map in heat map.plus

heatmap.plus(data_rearranged, cexRow = 0.6 + 1/log10(5), cexCol = 0.6 + 1/log10(10),
 scale="row", keep.dendro=FALSE,
 ColSideColors=colc,
 Rowv=NULL, Colv=NULL,main="Heatmap"
 col=my_palette,margin=c(20,10))

How can I add the color key in this?

Also I wanted to add two legends,how can I add one below other?These two legends don't look nice as one is in the left and other is at bottom left.

legend("left",      # location of the legend on the heatmap plot
 legend = c("Class1","Class2"), # category labels
 col = c("blue", "yellow"),  # color key
 lty= 2,             # line style
 lwd = 32            # line width
 )

legend("bottomleft",      # location of the legend on the heatmap plot
 legend = c("label1","label2"), # category labels
 col = c("orange", "pink"),  # color key
 lty= 2,             # line style
 lwd = 32            # line width
 )
R • 4.6k views
ADD COMMENT

Login before adding your answer.

Traffic: 1528 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