[R] heatmap color specification
Jim Lemon
jim at bitwrit.com.au
Sat Feb 10 12:29:08 CET 2007
Xiaohui wrote:
>...
> Then, I did a heatmap for 'test' matrix. But for now, I want to specify
> each of the cell in the heatmap according to the values of the
> corresponding matrix elements of test.
>
> Let's say: col<-c("red","yellow","green")
>
> for test[1,1], the color on the map should be "red".
>
> I have tried par('usr') and par('mar') with rect function. But this does
> not work because the rect shift from the original map. Could any one
> tell me how to fill the cells on the map with corresponding values? Or
> can we get the actual coordinates of the image excluding the dendregram.
>
Hi Xiaohui,
You may be looking for something like color2D.matplot in the plotrix
package or "image" in the graphics package.
Jim
More information about the R-help
mailing list