[R] help in R

Jim Lemon jim at bitwrit.com.au
Thu Oct 18 11:13:15 CEST 2012


On 10/18/2012 06:55 PM, namrata mohapatra wrote:
>
>
>
>
> Hello Sir/Madam
>
> I want to reverse the colour distribution . I want the lowest value of error to be in blue and highest in red .
>
> With Regards
> Namrata Mohapatra
>
Hi Namrata,
Let's see, where is my crystal ball?

Ah, right. I see that you are referring to an illustration produced by 
an example on a help page. In this illustration the transformation of 
value to color begins with red at the minimum and traverses the red-blue 
range with increasing values. Let us say that your values are contained 
in a vector named "values".

values<-sort(runif(10))
plot(1:10,pch=19,col=color.scale(values,extremes=c("blue","red")))

Jim




More information about the R-help mailing list