Skip to content

help in R

3 messages · namrata mohapatra, Berend Hasselman, Jim Lemon

#
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Rplot.pdf
Type: application/pdf
Size: 214037 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20121018/d59901e2/attachment.pdf>
#
On 18-10-2012, at 09:55, namrata mohapatra wrote:

            
Please provide a reproducible example in the form of R code.

Berend
#
On 10/18/2012 06:55 PM, namrata mohapatra wrote:
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