I think the preferred way of doing this is:
x1 <- 1:10
x2<- 11:20
y1<- rnorm(10)
y2 <- rnorm(10,0,1.5)
plot(x1, y1, xlim = range(x1, x2), ylim = range(y1, y2), type="b")
lines(x2, y2, type = "b")
--sundar
TzamouranisY@LouisDreyfus.com wrote:
Try this, Sohail:
x1 <- 1:10
> x2<- 11:20
> y1<- rnorm(10)
> y2<-rnorm(10,0,1.5)
> plot(x1,y1, xlim=range(x1,x2) , ylim=range(y1,y2) , type="b")
> par(new=T, xaxs="d")
> plot(x2,y2, xlim=range(x1,x2), type="b" )
Yannis Tzamouranis
*"Khan, Sohail" <khan@cshl.edu>*
Sent by: s-news-owner@lists.biostat.wustl.edu
08/29/2005 05:11 PM
To: <s-news@lists.biostat.wustl.edu>
cc:
Subject: [S] Overlaying Graphs
Dear S-PLUS users,
I want to create overlaying scatter plots. I.E. I have common x-axis
for multiple variables.
I couldn't find info. on how to go about doing this in the s-plus
manual. I apologize if this is a trivial question for this list.
Thanks
Sohail Khan
Scientific Programmer
COLD SPRING HARBOR LABORATORY
Genome Research Center
500 Sunnyside Boulevard
Woodbury, NY 11797
(516)422-4076
--------------------------------------------------------------------
This message was distributed by s-news@lists.biostat.wustl.edu. To
unsubscribe send e-mail to s-news-request@lists.biostat.wustl.edu with
the BODY of the message: unsubscribe s-news
|