Re: [R] combinging "plots"

From: Petr Pikal <petr.pikal_at_precheza.cz>
Date: Fri 21 Oct 2005 - 21:36:54 EST


Hi

from

?plot help page you can find see also
?points
?lines

If you have common x as you suggest by your example, matplot will make the desired result for you

matplot(x, cbind(y1,y2))

see
?matplot for details

HTH
Petr

On 21 Oct 2005 at 11:59, v.schlecht@arcor.de wrote:

Date sent:      	Fri, 21 Oct 2005 11:59:49 +0200 (CEST)
From:           	v.schlecht@arcor.de
To:             	r-help@stat.math.ethz.ch
Subject:        	[R] combinging "plots"

> If I have one set of points Line 1: {(0,0.87),(0.1,0.88),(0.2,0.89)}
> and another set of points {(0,0.75),(0.1,0.76),(0.2,0.77)} I can
> easily produce two separate diagrams:
>
> x<-c(0,0.1,0.2)
> y1<-c(0.87,0.88,0.89)
> y2<-c(0.75,0.76,0.77)
> p1<-plot(x,y1,type="b")
> p2<-plot(x,y2,type="b")
>
> But what can I do if I want ONE diagram, which contains bots lines so
> that they can be compared? In other words: How can I put both sets of
> points as parallel functions together into ONE and the same graph? How
> could I put any number of sets of points (perhaps y1,y2,...,y8) which
> belong to the same x into the same graph?
>
>
>
> Machen Sie aus 14 Cent spielend bis zu 100 Euro!
> Die neue Gaming-Area von Arcor - über 50 Onlinespiele im Angebot.
> http://www.arcor.de/rd/emf-gaming-1
>
> ______________________________________________
> R-help@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

Petr Pikal
petr.pikal@precheza.cz



R-help@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 Received on Fri Oct 21 21:43:13 2005

This archive was generated by hypermail 2.1.8 : Sun 23 Oct 2005 - 19:16:02 EST