[R] Box around legends (and postscript?)

Peter Dalgaard BSA p.dalgaard at biostat.ku.dk
Tue Dec 11 13:35:41 CET 2001

Prof Brian Ripley <ripley at stats.ox.ac.uk> writes:

> On Tue, 11 Dec 2001, Jim Lemon wrote:
> > "Michael J. Manning" wrote:
> > >
> > > ...I have another (lame?) question.  I have noted that when I produce
> > a
> > > graph with multiple plots (e.g. 2x2 plots on the graphics device)
> > > where each plot has multiple series and a legend with reasonable
> > > amounts of text describing the series, the right hand side of the box
> > > surrounding the legend always seems to be drawn through the legend
> > > text when I write the output to a postscript file.
> >
> > I've noticed the same problem when using dev.print() to produce a
> > postscript file. Interestingly, using postscript() directly seems to
> > avoid it, although I haven't had the time to discover why.
> Well, dev.print copies a display list from device to device, and doesn't
> always get the fonts set up the same way (although it tries).  Trying set
> pointsize in the call to dev.print.
> It's normally better to remake the plot than copy it if you want precise
> control.

..although it often helps considerably to make sure that the display
device and the print device have the same dimensions and pointsize.
(Usually what happens with text strings is that they get placed at the
same *relative* position, but at a different *absolute* distance from
one of the edges, whereas the stringwidth is roughly constant. 

   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)             FAX: (+45) 35327907
r-help 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-help-request at stat.math.ethz.ch

More information about the R-help mailing list