Skip to content

multiple plots on same x axis

3 messages · Iain Gallagher, Charles Annis, P.E., PIKAL Petr

#
Hi.

I have two vectors of gene expression for each of
several days. I want to plot both vectors on the same
plot for a visual representation of up versus down
regulation. I've tried using add=T but that doesn't
work. 

eg
Any help would be appreciated.

Iain
#
Try 

plot(Day, gene1)
lines(Day, gene2)


see 

?lines
 
for more details.


Charles Annis, P.E.

Charles.Annis at StatisticalEngineering.com
phone: 561-352-9699
eFax:  614-455-3265
http://www.StatisticalEngineering.com
 

-----Original Message-----
From: r-help-bounces at stat.math.ethz.ch
[mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of IAIN GALLAGHER
Sent: Tuesday, September 27, 2005 10:35 AM
To: r-help at stat.math.ethz.ch
Subject: [R] multiple plots on same x axis

Hi.

I have two vectors of gene expression for each of
several days. I want to plot both vectors on the same
plot for a visual representation of up versus down
regulation. I've tried using add=T but that doesn't
work. 

eg
Any help would be appreciated.

Iain

______________________________________________
R-help at stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide!
http://www.R-project.org/posting-guide.html
1 day later
#
Hi

You can use e.g. plot - points construction

plot(Day, gene1)
points(Day, gene2, col=2)

see
?points
?lines

You also need to set appropriate y range by ylim argument to first 
plot. And if you used search facility in CRAN and asked it

multiple plots on same x axis

you would have got many other posibilities for your question.

HTH
Petr
On 27 Sep 2005 at 15:34, IAIN GALLAGHER wrote:
Date sent:      	Tue, 27 Sep 2005 15:34:53 +0100 (BST)
From:           	IAIN GALLAGHER <iaingallagher at btopenworld.com>
To:             	r-help at stat.math.ethz.ch
Subject:        	[R] multiple plots on same x axis
Petr Pikal
petr.pikal at precheza.cz