Jim Lemon wrote:
> 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
>
Thanks, Jim. I found this problem can be solve with the 'scale' 
parameter specified to FALSE. If it is TRUE, then the positive integer 
is scale to a real number which will cause the problem earlier.

Xiaohui

______________________________________________
[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.

Reply via email to