[R] Crop white border for PDF output
Claus Atzenbeck
claus.atzenbeck at freenet.de
Tue Nov 22 14:59:16 CET 2005
On Tue, 22 Nov 2005, Marc Schwartz wrote:
> Without your code, it is hard to know exactly what you need to resolve
> the problem or why your manipulation of the margins did not work as you
> want, but I am guessing that the following might be helpful.
The reason why the manipulation of margins does not make me happy is
that I have to name concrete numbers for every diagram.
Basically, it would be nice to tell R to produce PDF output without
*any* white border. It looks ugly when viewed directly, but it is
perfect when included in documents, where, e.g., TeX takes care of
spaces between diagrams an captions, etc.
Even your examples with the reduced borders still show a white border
around the diagram. It would take rather long to get rid of that by
using trial and error.
The disadvantage with pdfcrop is that it takes an additional step:
First, I have to produce the diagrams, then, I have to call pdfcrop on
them to crop the white space. pdfcrop does a perfect job here: It crops
the complete white space around a diagram automatically without having
me to name some concrete numbers. It would be very nice if R would have
an option that would allow to do me to do this for graphics that will be
included in documents later.
Claus
More information about the R-help
mailing list