Dear CE.KA,
If 'x' is your data, you could do something like the following:
matplot(as.factor(c('1990','1992')),t(x[,-2]),type='l',
xaxt='n',xlab='Year',ylab="Some label
here",lty=1)
axis(1,c(1990,"","","",1992),c(1990,"","","",1992))
legend('topleft',paste('Observation',1:5),col=1:5,lty=1,cex=0.8)
See ?matplot, ?axis and ?legend for more details.
HTH,
Jorge
On Mon, Mar 23, 2009 at 5:33 PM, CE.KA <ce.kaya75@yahoo.fr> wrote:
>
> Hi R users,
>
> Imagine the folowing data frame
> 1990 1991 1992
> 1 5 20 6
> 2 15 1 11
> 3 3 14 22
> 4 20 8 55
> 5 10 3 14
>
> Is there a way to build a graphic in which:
> - 1 curve represents the observation 1 during 1990 & 1992
> - 1 curve represents the observation 2 during 1990 & 1992
> - 1 curve represents the observation 3 during 1990 & 1992
> - 1 curve represents the observation 4 during 1990 & 1992
> - 1 curve represents the observation 5 during 1990 & 1992
>
> Sincerely yours
> --
> View this message in context:
> http://www.nabble.com/Graphic-with-several-curves-tp22669675p22669675.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
[[alternative HTML version deleted]]