[R] 2 scatter plots in the same graphic window....

Spencer Graves spencer.graves at pdf.com
Wed Mar 26 20:07:27 CET 2003


x1 <- 1:9
y1 <- x1
x2 <- x1
y2 <- 9-x1
plot(c(0, 9), c(0, 9), type="n")
points(x1, y1, col=1, pch=1)
points(x2, y2, col=2, pch=2)

Is this what you want?
Spencer Graves

Vasudevan, Geetha wrote:
> Hello,
> 
> I am trying to do a scatter plot of x1,y1 and x2,y2 in the same graphics window with diff col/pch values. i cannot get it to do them in the same window. 
> 
> what is the cmd to do this? thanks.
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help



More information about the R-help mailing list