[R] extra whitespace around EPS files

Michael D. Sohn mdsohn at lbl.gov
Fri Jan 4 01:17:24 CET 2002


I'm having difficulty getting rid of extra whitespace above and below an
EPS figure.  For example, if  I generate an output file using these
commands:

> R.test(output='none')

where:

R.test <- function(output=NULL) {
  if (output == 'yes') {
    ps.options(pointsize=10)
    postscript('plot.eps', paper='special', horizontal=FALSE,
onefile=FALSE, height=3, width=6)
  }
  plot(rnorm(10), rnorm(10))
  if (output == 'yes') {
    dev.off()
    ps.options(reset=TRUE)
  }
}


I get a  bunch of extra whitespace above and below the figure.  However,
if I increase the height to say 5inches, the whitespace is gone.
Presumably the extra whitespace was filled up by the figure.  Is there a
way to get rid of the whitespace?  Even editing the bounding box of the
EPS figure didn't really help.

thanks,
Mike


-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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