[R] Color index in image function
FMH
kagba2006 at yahoo.com
Sun Sep 6 16:50:35 CEST 2009
Hi,
Thank you for your response. I'm looking for the names of the colors denoted by these codes and what do these colors represent for.
For instance, if we use topo.colors(5) in the image function, five different colors will be used in which its codes are denoted as:
[1] "#4C00FFFF" "#004CFFFF" "#00E5FFFF" "#00FF4DFF" "#FFFF00FF"
So, my first question is what type of color do these codes represent for? Are they white, red,...?
My second question is, if we use this topo.colors(5) in image function to denote the temperature values for intance, what are these colors represent for? Does the first color, "#4C00FFFF" represent the lower/medium/higher temperature?
I do hope you could advice me on this matter?
Thank you
Fir
----- Original Message ----
From: FMH <kagba2006 at yahoo.com>
To: Steve Lianoglou <mailinglist.honeypot at gmail.com>
Sent: Sunday, September 6, 2009 3:41:02 PM
Subject: Re: [R] Color index in image function
Hi,
Thank you for your response. I'm looking for the name of the colors denoted by this code and what are these colors representing for.
For instance, if we use topo.colors(5) in the image function, five different colors will be used in which its codes are denoted as:
[1] "#4C00FFFF" "#004CFFFF" "#00E5FFFF" "#00FF4DFF" "#FFFF00FF"
So, my first question is what type of color does these codes represent for? Are they white, red,...?
My second question is, if we use this topo.colors(5) in image function to denote the temperature values for intance, what are these colors represent for? Does the first color, "#4C00FFFF" represent the lower/medium/higher temperature?
I do hope you could advice me on this matter?
Thank you
Fir
----- Original Message ----
From: Steve Lianoglou <mailinglist.honeypot at gmail.com>
To: FMH <kagba2006 at yahoo.com>
Cc: r-help at r-project.org
Sent: Sunday, September 6, 2009 3:20:25 PM
Subject: Re: [R] Color index in image function
Hi,
On Sat, Sep 5, 2009 at 7:06 AM, FMH<kagba2006 at yahoo.com> wrote:
> Dear All,
>
> I was looking for the color index in image function, such as from topo.colors(n) and etc. but still never found it. For instance, from the help menu.
The answer is in the code:
> ###########################################
> # Volcano data visualized as matrix. Need to transpose and flip
> # matrix horizontally.
> image(t(volcano)[ncol(volcano):1,])
>
> # A prettier display of the volcano
> x <- 10*(1:nrow(volcano))
> y <- 10*(1:ncol(volcano))
> image(x, y, volcano, col = terrain.colors(100), axes = FALSE)
Right here:
R> terrrain.colors(100)
[1] "#00A600FF" "#03A700FF" "#07A800FF" "#0AAA00FF" "#0EAB00FF" ...
Is that what you mean?
-steve
--
Steve Lianoglou
Graduate Student: Computational Systems Biology
| Memorial Sloan-Kettering Cancer Center
| Weill Medical College of Cornell University
Contact Info: http://cbio.mskcc.org/~lianos/contact
More information about the R-help
mailing list