On Thursday 19 August 2004 06:38, Matthew Walker wrote: > I'm baffled as to how the Lattice package achieves clipping. Would > someone mind explaining this to me? > > Firstly, my attempt using "just" the grid package: > > x<-seq(0,3,by=0.3)/2.8 > y<-seq(0,1,by=0.1) > > grid.newpage() > grid.rect(gp=gpar(fill="pink")) > > vp<-viewport(width=0.8, height=0.8)
You need to add 'clip="on"' here. Clipping is a property of viewports (not individual 'grob'-s as produced by grid.points and grid.lines), controlled by the 'clip' argument to viewport(). Details (and caveats) in ?viewport. Hth, Deepayan ______________________________________________ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
