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
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.