Re: [R] How can I plot this graph

2007-12-07 Thread Jim Lemon
David Rees wrote: > ... > What I need is the following > > - One graph > - y1, y2, y3 plotted as seperate lines vs x > - z1, z2 give the range of the value of z, and need to be plotted as error > bars or confidence intervals vs x > This doesn't look right to me, but it might give you a start:

Re: [R] How can I plot this graph

2007-12-06 Thread Gabor Grothendieck
Try this: matplot(xxx[,1], xxx[2:4], type = "l") with(xxx, { segments(x, z1, x, z2) points(x, z1) points(x, z2) }) Omit the two points commands if you don't want circles at the ends of the segments. On Dec 6, 2007 6:30 PM, David Rees <[EMAIL PROTECTED]> wrote: > Hi, > > I

[R] How can I plot this graph

2007-12-06 Thread David Rees
Hi, I am having trouble plotting the graph I need given the follow kind of data > xxx <- data.frame( "x"=c(1,2,3,4,5), "y1"=c(2,4,3,5,6), "y2"=c(3,4,6,3,1), "y3"=c(1,3,5,7,3), "z1"=c(1,NA,3,5,NA), "z2"=c(2,N