Re: [R] xyplot, type="b"

From: Sundar Dorai-Raj <sundar.dorai-raj_at_pdf.com>
Date: Wed 21 Jun 2006 - 14:26:23 EST

I think Paul's suggestion works if you use:

  panel.points(x, y, col = "white", cex = 1.5, pch = 16, ...)

instead of the default background color. For me trellis.par.get("background")$col returns "transparent".

HTH, --sundar

Benjamin Tyner wrote:
> 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
>>

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



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Wed Jun 21 14:32:25 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Thu 22 Jun 2006 - 06:11:34 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.