[R] Scatter Plot in R - Help

A Ezhil ezhil02 at yahoo.com
Fri Apr 27 18:31:09 CEST 2007


Dear All,

I am using the following commands to do the scatter
plot of two vectors, say X and Y.

plot(X,Y, col="blue")
abline(a=1,b=1, col="red")
abline(a=-1,b=1, col="green")

I would like to split the scatter plot into 3 part
with 3 different colors: (i) points lies between 2
lines, (ii) points above line 1, and (iii) points
below line 2. I am struggling to do this. I would
greatly appreciate any help in doing this.

Thanks in advance.

Kind regards,
Ezhil



More information about the R-help mailing list