Hi, > image.plot(x, breaks=c(-100,-1,1,100), col=c('green','black','red'))
Regards, Pascal ----- Mail original ----- De : David Lyon <david_ly...@yahoo.com> À : "r-help@r-project.org" <r-help@r-project.org> Cc : Envoyé le : Mercredi 18 avril 2012 0h00 Objet : [R] image.plot specify colors for range of data points, please help Hi If I had a dataset of the following below and I want to plot colors for this image.plot so that: red for data above 1 black for data between/equal 1 and -1 green for data below -1 normally its: image.plot(data) but how do I add the colors for the range of data points as above? Many thanks for your help! _DATA_ 2.04 2.02 1.60 1.92 0.98 0.50 0.40 -0.50 -0.40 -1.90 -2.8 ______________________________________________ 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. ______________________________________________ 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.