Skip to content
Back to formatted view

Raw Message

Message-ID: <CANROs4d0wLEx7whnovpy991TWHnXtTZFUFiUSG73_FaB9TyUEQ@mail.gmail.com>
Date: 2012-05-25T19:57:31Z
From: Yihui Xie
Subject: sweave tables as images?
In-Reply-To: <4FBFE134.1030307@ufl.edu>

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 <xieyihui at 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 <ashenkin at 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