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

Henrik Bengtsson hb at maths.lth.se
Wed Mar 26 19:54:22 CET 2003


plot() and points(), e.g.

x <- matrix(rnorm(300), ncol=3)
plot(x[,1],x[,2], pch=1, col="red")
points(x[,1],x[,3], pch=2, col="blue")

Cheers

Henrik Bengtsson
Lund University

> -----Original Message-----
> From: r-help-bounces at stat.math.ethz.ch 
> [mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of 
> Vasudevan, Geetha
> Sent: den 26 mars 2003 19:35
> To: r-help at stat.math.ethz.ch
> Subject: [R] 2 scatter plots in the same graphic window....
> 
> 
> 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