[R] adding a line to a single panel of a lattice plot

About this list Date view Thread view Subject view Author view Attachment view

From: Ken Knoblauch (knoblauch@lyon.inserm.fr)
Date: Mon 17 May 2004 - 16:59:48 EST


Message-id: <1084777188.40a862e4e6cad@webmail.lyon.inserm.fr>

I'm struggling to find a way to add a line (abline, lline or lmline) to
a single panel of a lattice plot. In one panel, there is an outlier
and I'd like to include a second lmline fit to the data without this
point. I've looked through nine pages of the archives on lattice
and it wasn't obvious (to me) what additional search keyword to add
to hone in on this, although I would think that it's an issue that
would have come up before. I've played around with the
groups, subscripts and panel.superpose arguments and looked through
the lattice.par.get list but haven't found the way to do it yet.
Here is the structure of thecommand that I'm working with,
but with the abline appearing on all (3 in my case) panels:

xyplot(y ~ x | z, data = my.df,
  panel=function(x,y) {
    panel.xyplot(x,y)
    panel.lmline(x,y)
   panel.abline(c(0.25,0.79,lty=2) #would like this only on panel 1
  },
       layout=c(3,1),aspect="x",
       scales=list(cex=1.2),
       xlab=list(label="x"),
       ylab=list(label="y")

Thanks for any help or directions thereto, in advance.

Ken

____________________
Ken Knoblauch
Inserm U 371
Cerveau et Vision
18 avenue du Doyen Lepine
69675 Bron cedex
France
tel: +33 (0)4 72 91 34 77
fax: +33 (0)4 72 91 34 61
portable: 06 84 10 64 10

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


About this list Date view Thread view Subject view Author view Attachment view

This archive was generated by hypermail 2.1.3 : Mon 31 May 2004 - 23:05:11 EST