[R] image.plot specify colors for range of data points, please help

David Lyon david_lyon3 at yahoo.com
Tue Apr 17 17:00:57 CEST 2012


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



More information about the R-help mailing list