Re: [R] drawing segments through points with pch=1

2008-07-22 Thread Mike Prager
David Epstein <[EMAIL PROTECTED]> wrote: > Please excuse me for asking such basic questions: > > Here is my code > > y=c(1.21,0.51,0.14,1.62,-0.8,0.72,-1.71,0.84,0.02,-0.12) > > ybar=mean(y) > > ll=length(y); > > ybarv=rep(ybar,ll) > > x=1:ll > > plot(x,ybarv,pch=1) > > segments(x[1],ybar,x[ll],y

Re: [R] drawing segments through points with pch=1

2008-07-21 Thread Paulo Barata
ative e-mail: [EMAIL PROTECTED] >Message: 14 >Date: Sun, 20 Jul 2008 13:44:27 +0100 >From: David Epstein <[EMAIL PROTECTED]> >Subject: [R] drawing segments through points with pch=1 >To: r-help@r-project.org >Message-ID: <[EMAIL PROTECTED]> >Conte

Re: [R] drawing segments through points with pch=1

2008-07-21 Thread Martin Maechler
> "DE" == David Epstein <[EMAIL PROTECTED]> > on Sun, 20 Jul 2008 15:40:34 +0100 writes: DE> What I don't like about type="b", also suggested by Paul DE> Smith, is that the segments do not go right up to the DE> little circles---a gap is left, which I don't like. The gap

Re: [R] drawing segments through points with pch=1

2008-07-21 Thread Jim Lemon
A. On Sun, 2008-07-20 at 15:40 +0100, David Epstein wrote: > What I don't like about type="b", also suggested by Paul Smith, is > that the segments do not go right up to the little circles---a gap is > left, which I don't like. So far, Uwes' solution is what suits me > best. However, I u

Re: [R] drawing segments through points with pch=1

2008-07-20 Thread David Epstein
What I don't like about type="b", also suggested by Paul Smith, is that the segments do not go right up to the little circles---a gap is left, which I don't like. So far, Uwes' solution is what suits me best. However, I understand Brian's objection, though it doesn't apply in my case. The d

Re: [R] drawing segments through points with pch=1

2008-07-20 Thread Prof Brian Ripley
On Sun, 20 Jul 2008, Uwe Ligges wrote: You probably want to make your code readable, read ?points and go ahead by making the plot without points (plot(., type="n")), drawing segments and at the end paint points with white background colour in order to "overwrite" the segments: Except tha

Re: [R] drawing segments through points with pch=1

2008-07-20 Thread Uwe Ligges
You probably want to make your code readable, read ?points and go ahead by making the plot without points (plot(., type="n")), drawing segments and at the end paint points with white background colour in order to "overwrite" the segments: y <- c(1.21, 0.51, 0.14, 1.62, -0.8, 0.72, -

Re: [R] drawing segments through points with pch=1

2008-07-20 Thread Paul Smith
On Sun, Jul 20, 2008 at 1:44 PM, David Epstein <[EMAIL PROTECTED]> wrote: > Please excuse me for asking such basic questions: > > Here is my code >> >> y=c(1.21,0.51,0.14,1.62,-0.8,0.72,-1.71,0.84,0.02,-0.12) >> ybar=mean(y) >> ll=length(y); >> ybarv=rep(ybar,ll) >> x=1:ll >> plot(x,ybarv,pch=1) >>

[R] drawing segments through points with pch=1

2008-07-20 Thread David Epstein
Please excuse me for asking such basic questions: Here is my code y=c(1.21,0.51,0.14,1.62,-0.8,0.72,-1.71,0.84,0.02,-0.12) ybar=mean(y) ll=length(y); ybarv=rep(ybar,ll) x=1:ll plot(x,ybarv,pch=1) segments(x[1],ybar,x[ll],ybar) What I get is a collection of small circles, with a segment "on top