[Rd] dev.copy2eps: position of figure on page

Peter Kleiweg kleiweg@let.rug.nl
Fri, 29 Dec 2000 23:00:21 +0100 (CET)


Prof Brian Ripley skriver...

> On Fri, 29 Dec 2000, Peter Kleiweg wrote:

> > The definition for dev.copy2eps contains the following line:
> > 
> >     oc$paper <- "special"
> > 
> > The result of this is that the output will be placed in the left
> > bottom corner of the page. Even though dev.copy2eps is meant for
> > creating files that are to be included into other documents, you
> > might want to print the figure directly, just to see how it will
> > look on paper. (Of course, this will only work if the figure 
> > is not larger than the papersize.) When the figure is in the
> > left bottom corner, this is a bit awkward, because marks too
> > close to the edge will get lost.
> 
> Can't you print from a viewer that will fix this, in particular
> take your printer's PPD into account.

Usually I just print with Unix command lp. I could write a
script that would shift the image to the centre of the page
before printing. Never needed such a thing before. I'm used to
application creating EPS with images centred.

> EPSF is not supposed to be sent directly to a printer.

That's what I said. Doesn't mean you should make it
unnecessarily difficult.

> > I suggest to put the figure at the centre of the default paper
> > size (or perhaps the papersize as set as an argument by the
> > user). It won't matter for EPS-inclusion were on the paper
> > the figure is, as long as the boundingbox is set correctly.
> 
> It does matter in some cases, and in others it saves a *lot* of
> memory. Some includers turn the whole page into a bitmap and then crop it
> to the bounding box.  Others will crop to the smaller of
> the Media and the bounding box, or crop to the Media only.

I never encoutered software that behaves in such a silly matter.
But I take your word for it.

> > I redefined dev.copy2eps in my ~/.Rprofile with the above line
> > replaced by:
> > 
> >     oc$paper <- "default"
> 
> Please don't.  Make a copy with another name and change that.
> One day you will need dev.copy2eps as intended, and you will
> either be puzzled about the result or file a bug report ...

That's a sound suggestion.

Why not allow for the user to set the papersize? Instead of
having in the body of dev.copy2eps the following line:

    oc$paper <- "special"

you could put this:

    if (is.null(oc$paper))
        oc$paper <- "special"

The way it is now, I *can* specify the paper as an option, but
it is ignored in the body and replaced by "special". I think
it's annoying to have options that don't work. And being used to
working with Unix, I don't think you should "protect" people by
limiting their options.

-- 
Peter Kleiweg
http://www.let.rug.nl/~kleiweg/

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._