Option to include key for RMSIP matrix heatmap
are there arguments to specify a key for the heatmap function plot?
heatmap(1 - modes$rmsip, symm=TRUE)
Comments (4)
-
-
Can you be more specific? I assume that you mean to load first library(ggplot). If this assumption is correct, how then does one set the key? An associated question is how does one change the colour of the heat map, for example to “greens”? Thanks in advance for any suggestions.
-
It is not “ggplot”. It is a package called gplots. After
library(gplots)
, type?heatmap.2
and you will see the description about how to setup a “key”. The same place, you can see the detail of how to change colors by ‘col’.
For example,
heatmap.2(x, key=TRUE, col=terrain.colors())
-
gplots works. Not very pretty, but works. I tried “clustermap” of Seaborn (python package). This worked for me much better.
- Log in to comment
Hi,
The stats::heatmap() does not have a key. But you can try the heatmap.2() from the gplots package, which gives you an option to set the key.