Skip to content
Prev 26973 / 63434 Next

Defaults for postscript()

On Tue, 2007-12-11 at 10:30 +0000, Prof Brian Ripley wrote:
That actually sounds familiar. I think that I ran into that a few years
ago when I was writing some reports and attempted to use that option.

Yep, checking my svn files, I found the following comment:

# Set ps.options() for most, though postscript() will override the
# onefile = FALSE.
ps.options(horizontal = FALSE, paper = "special", 
           width = 9.5, height = 7.5)
...

Apparently, for whatever reason, I did not pursue it further...seems
contrary to my usual dive in with both arms and feet paradigm... :-)
I do agree here that given the catalyst for considering these changes,
it seems appropriate to focus on ease of use, which in this case, would
need not come at the expense of flexibility.

Within that context, I do rather fancy Henrik's suggestion of an eps()
wrapper to postscript:

  https://stat.ethz.ch/pipermail/r-devel/2007-December/047658.html

though I might be tempted to further constrain the function prototype
to:

  eps <- function(file = "Rplot%03d.eps", height = 6, width = 6, ...) {
     postscript(file = file, onefile = FALSE, horizontal = FALSE,
                height = height, width = width, paper = "special", ...)
  }

given the most common use of eps files. That still leaves the native
postscript() function available for additional customization as
required, including using ps.options().
This seems reasonable for all of the reasons referenced. Even for LaTeX
use, unless one is using PS specific packages (eg. pstricks, which I
tend to use for diagrams, etc.), using pdflatex seems more common for
new users.
My initial reaction is that this approach would seem to make things more
difficult from a maintenance/documentation standpoint, but perhaps I am
missing something.
I noted that in svn. Thanks.
Again, seems reasonable. I would tend to favor parsimony here.

Thanks!

Marc

<snip>