Re: [R] Color scale graphic

From: Jim Lemon <jim_at_bitwrit.com.au>
Date: Sun, 06 Jun 2010 18:36:09 +1000

On 06/06/2010 10:02 AM, Diogo_Silva wrote:
>
> Hello
>
> Recently, I've been dealing with a seemingly simple problem. I have a table
> with two columns filled with values from a test I made (say, amount of
> precipitation and Months measured). Now, instead of plotting a typical
> linear graphic with precipitation on the y-axis and the months in the
> x-axys, I would like to "convert" the values of precipitation in a color
> gradient, resulting in a vertical gradient throughout the x-axis. In this
> way, months with higher precipitation would appear reddish while lower
> precipitation would appear blueish, for example. Despite being a simple
> problem (basically converting the y-values in a color gradient), I have
> failed to find a way of doing this.
>
Hi Diogo,
The answer is in the subject line. color.scale or smoothColors in the plotrix package will probably be what you want.

Jim



R-help_at_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. Received on Sun 06 Jun 2010 - 08:35:01 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sun 06 Jun 2010 - 10:20:28 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive