Thank you
________________________________ From: Henrique Dallazuanna <www...@gmail.com> Cc: r-help@r-project.org Sent: Sunday, September 6, 2009 4:30:14 PM Subject: Re: [R] Color index in image function Try this to see which colors the codes are: Color <- function(color){ z <- matrix(1:length(color), ncol = length(color)) image(y = seq(1, length(color)), z, col = color, axes = FALSE) text(0, y = z, labels = color, pos = 1, offset = 0, cex = 0.7) } Color(topo.colors(5)) Color(terrain.colors(10)) You can use levelplot from lattice package too. 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 ---- >To: Steve Lianoglou <mailinglist.honey...@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.honey...@gmail.com> >Cc: r-help@r-project.org >Sent: Sunday, September 6, 2009 3:20:25 PM >Subject: Re: [R] Color index in image function > >Hi, > >> 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/%7Elianos/contact > > > > >______________________________________________ >R-help@r-project.org 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. > -- Henrique Dallazuanna Curitiba-Paraná-Brasil 25° 25' 40" S 49° 16' 22" O [[alternative HTML version deleted]]
______________________________________________ R-help@r-project.org 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.