s-news
[Top] [All Lists]

Re: Overlaying Graphs

To: TzamouranisY@LouisDreyfus.com
Subject: Re: Overlaying Graphs
From: Sundar Dorai-Raj <sundar.dorai-raj@pdf.com>
Date: Tue, 30 Aug 2005 08:18:16 -0500
Cc: "Khan, Sohail" <khan@cshl.edu>, s-news@lists.biostat.wustl.edu
In-reply-to: <OFC267F3FB.7E8A8190-ON8525706D.003EC091-8525706D.003F6D57@ldcorp.com>
Organization: PDF Solutions, Inc.
References: <OFC267F3FB.7E8A8190-ON8525706D.003EC091-8525706D.003F6D57@ldcorp.com>
User-agent: Mozilla Thunderbird 1.0.2 (Windows/20050317)
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



<Prev in Thread] Current Thread [Next in Thread>