Re: [R] Adding points on top of lines in xyplot [solved]

2007-11-20 Thread Dylan Beaudette
On Tuesday 20 November 2007, Deepayan Sarkar wrote: > On 11/20/07, Dylan Beaudette <[EMAIL PROTECTED]> wrote: > > On Tuesday 20 November 2007, Deepayan Sarkar wrote: > > > On 11/20/07, Dylan Beaudette <[EMAIL PROTECTED]> wrote: > > > > > > [...] > > > > > > > Example: > > > > library(lattice) > > >

Re: [R] Adding points on top of lines in xyplot

2007-11-20 Thread Deepayan Sarkar
On 11/20/07, Dylan Beaudette <[EMAIL PROTECTED]> wrote: > On Tuesday 20 November 2007, Deepayan Sarkar wrote: > > On 11/20/07, Dylan Beaudette <[EMAIL PROTECTED]> wrote: > > > > [...] > > > > > Example: > > > library(lattice) > > > > > > # generate some data: > > > resp <- rnorm(100) > > > pred <-

Re: [R] Adding points on top of lines in xyplot

2007-11-20 Thread Dylan Beaudette
On Tuesday 20 November 2007, Deepayan Sarkar wrote: > On 11/20/07, Dylan Beaudette <[EMAIL PROTECTED]> wrote: > > [...] > > > Example: > > library(lattice) > > > > # generate some data: > > resp <- rnorm(100) > > pred <- resp*1.5 + rnorm(100) > > d <- data.frame(resp=resp, pred=pred) > > > > # add

Re: [R] Adding points on top of lines in xyplot

2007-11-20 Thread Deepayan Sarkar
On 11/20/07, Dylan Beaudette <[EMAIL PROTECTED]> wrote: [...] > Example: > library(lattice) > > # generate some data: > resp <- rnorm(100) > pred <- resp*1.5 + rnorm(100) > d <- data.frame(resp=resp, pred=pred) > > # add a grouping factor: > d$grp <- gl(4, 25, labels=letters[1:4]) > > # plot: loo

Re: [R] Adding points on top of lines in xyplot

2007-11-20 Thread Dylan Beaudette
On Tuesday 20 November 2007, Deepayan Sarkar wrote: > On 11/20/07, Dylan Beaudette <[EMAIL PROTECTED]> wrote: > > On Tuesday 20 November 2007, Deepayan Sarkar wrote: > > > On Nov 20, 2007 11:14 AM, David Afshartous <[EMAIL PROTECTED]> > > > > wrote: > > > > All, > > > > > > > > I'm trying to make a

Re: [R] Adding points on top of lines in xyplot

2007-11-20 Thread Rolf Turner
On 21/11/2007, at 8:40 AM, Deepayan Sarkar wrote: > There's a way to do almost everything, but we need a reproducible > example (preferably minimal) and a clear statement of what you want to > do to help. Is this a candidate for fortune() ? cheers,

Re: [R] Adding points on top of lines in xyplot

2007-11-20 Thread Deepayan Sarkar
On 11/20/07, Dylan Beaudette <[EMAIL PROTECTED]> wrote: > On Tuesday 20 November 2007, Deepayan Sarkar wrote: > > On Nov 20, 2007 11:14 AM, David Afshartous <[EMAIL PROTECTED]> > wrote: > > > All, > > > > > > I'm trying to make a basic plot: data points superimposed upon the a line > > > connecting

Re: [R] Adding points on top of lines in xyplot

2007-11-20 Thread Dylan Beaudette
On Tuesday 20 November 2007, Deepayan Sarkar wrote: > On Nov 20, 2007 11:14 AM, David Afshartous <[EMAIL PROTECTED]> wrote: > > All, > > > > I'm trying to make a basic plot: data points superimposed upon the a line > > connecting the points w/ a different color. Example below doesn't work > > as

Re: [R] Adding points on top of lines in xyplot

2007-11-20 Thread Gabor Grothendieck
Try this: xyplot(y ~ Hour, xlab = list("Hour", font=2, cex=2), ylab= list("U_x * V", font=2, cex=2), type = 'l', scales = list( x= list(tick.number=5, cex=2, limits=c(0,4.5)), y=list(cex=0)), lines=TRUE, lwd = 2) trellis.focus("panel", 1, 1, highlight = FALSE) print(panel.points(Hour, y, pch = 16

Re: [R] Adding points on top of lines in xyplot

2007-11-20 Thread Deepayan Sarkar
On Nov 20, 2007 11:14 AM, David Afshartous <[EMAIL PROTECTED]> wrote: > > All, > > I'm trying to make a basic plot: data points superimposed upon the a line > connecting the points w/ a different color. Example below doesn't work as > the first xyplot call doesn't remain. Suggestions? xyplot(y ~

[R] Adding points on top of lines in xyplot

2007-11-20 Thread David Afshartous
All, I'm trying to make a basic plot: data points superimposed upon the a line connecting the points w/ a different color. Example below doesn't work as the first xyplot call doesn't remain. Suggestions? David Hour = c(NA,1,2,3,4) y = c(2,2,3,2,1.5) xyplot(y ~ Hour, xlab = list("Hour", font