Message-ID: <48DE210F.9070306@bitwrit.com.au>
Date: 2008-09-27T12:03:27Z
From: Jim Lemon
Subject: Trend graph
In-Reply-To: <30d7ea360809262053l3691c3d7u781111a70674a04e@mail.gmail.com>
C.H. wrote:
> Dear R Gurus,
>
> I have a problem related to plot.
> For example, I have two variables, pre and post.
>
> pre <- c(1,2,3,4,5)
> post <- c(2,5,7,2,3)
>
> How can I plot a line graph similar to this one?
>
> http://www.pubmedcentral.nih.gov/articlerender.fcgi?artid=1847566&rendertype=figure&id=F1
>
> Would you please provide me a keyword so that I can search. I don't
> know what is the name of this type of graph.
>
>
Hi Chainsaw (both my wife and I like chainsaws),
I would use lines - I don't know of any specific function that will do this.
pp.mat<-cbind(pre,post)
plot(1:2,c(1,7),type="n",xaxt="n")
axis(1,at=1:2)
apply(pp.mat,1,lines)
Jim