On 2009-March-20 , at 16:23 , David Winsemius wrote:
On Mar 20, 2009, at 3:55 PM, Altaweel, Mark R. wrote:
I have a problem where I have two columns of data that I can simply
plot using:
plot(wV[0:15,3],wY[0:15,3]).
Perhaps:
plot(wV[0:15,3],wY[0:15,3], col = ifelse(wY[0:15,3]>0, "blue","red") )
And you could look into the package ggplot2 which gives you a legend
and is well suited for these things.
# quick version:
qplot(wV[0:15,3], wY[0:15,3], colour=ifelse(wY[0:15,3]>0,">0","<0"))
# more explicit version, using a data.frame
dat = data.frame(v=wV[0:15,3], y=wY[0:15,3],
sign=ifelse(wY[0:15,3]>0,">0","<0"))
ggplot(data=dat) + geom_point(aes(x=v,y=y,colour=sign))
JiHO
---
http://jo.irisson.free.fr/
______________________________________________
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.