liujb wrote:
Dear R users,

I need to compare two scatter plots,
plot(x1, y1)
plot(x2, y2)

and would like to plot them in the same figure. How do I do it?

Hi liujb,
How about this:

plot(x1,y1,xlim=range(c(x1,x2)),ylim=range(c(y1,y2)),col="red")
points(x2,y2,col="blue")


Jim

______________________________________________
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.

Reply via email to