You may take a look at knitr's graphics manual which tells you how you can automatically crop the white margins: https://github.com/downloads/yihui/knitr/knitr-graphics.pdf ("Cropping PDF Graphics").
I'm not sure if pdfcrop works in this case, though. Regards, Yihui -- Yihui Xie <xieyi...@gmail.com> Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On Fri, May 25, 2012 at 2:44 PM, Alexander Shenkin <ashen...@ufl.edu> wrote: > grid.table() works well, but using it in sweave creates graphics with > very wide margins. I'm sure this has something to do with grid, and not > just grid.table. Any idea how I can clip the graphic to the edges of > the table graphic? I've looked into viewports, etc, but I can't seem to > find anything that will clip a graphic to its edges, perhaps with some > defined margin. > > any help greatly appreciated! > > thanks, > allie ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.