[R] point characters THICKER in xyplot()

Deepayan Sarkar deepayan.sarkar at gmail.com
Sat Oct 9 08:43:23 CEST 2010


On Fri, Oct 8, 2010 at 5:19 PM, array chip <arrayprofile at yahoo.com> wrote:
> Hi, how can I make the point characters thicker (NOT larger) in xyplot when
> groups= argument is used?
>
> dat<-data.frame(x=1:100,y=1:100,group=rep(LETTERS[1:5],each=20))
>
>    ### lwd=2 doesn't work here
> xyplot(y~x,groups=group,data=dat,col=1:4,pch=1:4,lwd=2)
>
>    ### lwd=2 works with panel.points(), but grouping is messed up!
> xyplot(y~x,groups=group,data=dat,col=1:4,pch=1:4,
>    panel=function(...) {panel.points(...,lwd=2)})
>
>    ### group is correct with panel.superpose(), but lwd=2 doesn't work!
> xyplot(y~x,groups=group,data=dat,col=1:4,pch=1:4,
>    panel=function(...) {panel.superpose(...,lwd=2)})
>
> Any suggestions?

xyplot(y~x,groups=group,data=dat,col=1:4,pch=1:4,lwd=2,
       panel = panel.superpose, panel.groups = panel.points)

panel.xyplot() should also honor lwd at some point (but I haven't
gotten around to it yet).

-Deepayan



More information about the R-help mailing list