Re: [Rd] bounding box in PostScript

From: Prof Brian Ripley <ripley_at_stats.ox.ac.uk>
Date: Tue 18 Apr 2006 - 08:35:28 GMT

On Tue, 18 Apr 2006, Berwin A Turlach wrote:

> G'day David,
>
>>>>>> "DA" == David Allen <allen@ms.uky.edu> writes:
>
> DA> When a graph is saved as PostScript, the bounding box is often
> DA> too big. A consequence is that when the graph is included in
> DA> a LaTeX document, the spacing does not look good. Is this a
> DA> recognized problem? Is someone working on it? Could I help?
> How exactly are you saving the graph as PostScript?
>
> I guess the problem is due to the fact that you save the PostScript
> picture on a paper according to your default paper size (which is "a4"
> for me). To create PostScript pictures with reasonalbe tight bounding
> boxes that are suitable to be included in a LaTeX document you should
> specify `paper=special' and then define your plotting area via the
> 'height' and 'width' argument.

To clarify, the bounding box is always for the device region, not the paper, even when (as by default) the device region is centred on the paper with 0.25" margins. The problems with just using postscript() are

  1. The plot is rotated (the default for 'horizontal').
  2. The text is too normally small for inclusion in other documents, since the size is chosen to be appropriate for a whole-page plot.
  3. The header may cause the including application not to use the bounding box, but for example the DocumentMedia or some inbuilt assumption.

I am pretty sure the perceived problem is the margins on the figure region, and the appropriate way is to reduce those vai par(mar=). (I do that for all my books.)

-- 
Brian D. Ripley,                  ripley@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Received on Tue Apr 18 18:49:20 2006

This archive was generated by hypermail 2.1.8 : Tue 18 Apr 2006 - 18:18:04 GMT