[BioC] Color Question about image function in graphics package

Joern Toedling toedling at ebi.ac.uk
Wed Jul 25 23:14:34 CEST 2007


Hello Shiliang,

please have a look a the manual page for image (access from R by typing 
"?image" ). You can specify which colors to use and at which values to 
switch colors using the arguments breaks and colors. For example:

image(matrix(rnorm(36),4,9)+20,col=c("red","blue"),breaks=c(-1e5,20,1e5))

basically says: display every cell with a value below 20 in red 
(breaks[1:2] specify the interval for "red") and every value above 20 in 
blue
(breaks[2:3] specify the interval for "blue").

Regards,
Joern


swang wrote:
> Dear Lists:
>
> I had  a matrix which has lrt score for my microarray data. I just wonder
> how to visualize them with score over 20 in particular color such as blue.
> I cannot understand the color relationship with the value in z matrix. For
> example, If I see a red color in my image generated by image function. I
> don't know what is the value of z in that spot.
> Example:
> aaa <- matrix(rnorm(36),4,9)
> image(aaa)
>
> Can I paint the cells at which their values are higher than a certain value
> in image()?
> Or I have to use some other functions,
>
> best
>
> Shiliang
>
> 	[[alternative HTML version deleted]]
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor
>



More information about the Bioconductor mailing list