[R] xyplot, type="b"

Benjamin Tyner btyner at gmail.com
Wed Jun 21 05:59:34 CEST 2006


I can imagine the intended effect of this, but for some reason it does
not work as expected--the 'gaps' do not show up (I'm using 2.3.0). Also,
I think it would have to be tweaked to prevent overlapping for points
very close together. Incidentally, the benefit I seek is most pronounced
with pch=".", as then one gets the best of both worlds.

Ben

Paul Murrell wrote:

>Is this what you mean ... ?
>
>dat<-data.frame(x=1:10,y=1:10,z=sample(letters[1:3],10,T))
>xyplot(y~x | z, data = dat,
>       panel = function(x, y, ...) {
>         panel.lines(x, y, ...)
>         panel.points(x, y, col=trellis.par.get("background")$col,
>                      cex=1.5, pch=16, ...)
>         panel.points(x, y, ...)
>       })
>
>Paul
>



More information about the R-help mailing list