[R] Colored boxes with values in the box

Bert Gunter gunter.berton at gene.com
Fri Mar 23 00:08:54 CET 2007


Sounds like  ?image  what you are looking for, perhaps?

Bert Gunter
Genentech Nonclinical Statistics
South San Francisco, CA 94404
650-467-7374



-----Original Message-----
From: r-help-bounces at stat.math.ethz.ch
[mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of Pappu, Kartik
Sent: Thursday, March 22, 2007 3:42 PM
To: r-help at stat.math.ethz.ch
Subject: [R] Colored boxes with values in the box

Hi all,

I have a x, y matrix of numbers (usually ranging from 0 to 40).  I need 
to group these numbers and assign a color to each group (for example 0 
to 15 - Blue, 16-30- Yellow, and 31-40- Red).  Then I need to draw a 
rectangular matrix which contains X x Y boxes and each box has the  
corresponding value from the input matrix and is also colored according 
to which group (i.e red, yellow, or blue) that value falls into.

I have used the color2D.matplot function from the plotrix package, but 
I cant quite figure out how to group the values to represent red blue 
and yellow colors.

Thanks

Kartik


----------------------------------------------------------
IMPORTANT WARNING:  This email (and any attachments) is only...{{dropped}}

______________________________________________
R-help at stat.math.ethz.ch 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.



More information about the R-help mailing list