[R] graphics

Martin Maechler maechler at stat.math.ethz.ch
Wed Dec 1 17:57:25 CET 1999

 >>>>> Peter Dalgaard BSA <p.dalgaard at biostat.ku.dk> adds:

    PD> Jim Lindsey <jlindsey at alpha.luc.ac.be> writes:
    >> I have been receiving complaints that my libraries no longer give
    >> reasonable graphics with R0.90. I have been replying that I have not
    >> changed anything. Among my travels (presently in Umea), I have
    >> finally had a chance to take a look. The best way to describe the
    >> current default graphics is HORRIBLY UGLY. The R core member who
    >> made those changes should buy glasses to see the screen better
    >> instead of imposing his near sightedness on the rest of us. The
    >> worst is that the most important options that have been modified are
    >> RO so we can do nothing. As PS graphics are also knackered, we
    >> currently have no way of viewing a reasonable graph produced by R.

    PD> Well, the font sizes are as I have had them for ages: 12pt on a
    PD> 100dpi assumed resolution. If that's too large, fine, complain and
    PD> if you gain a sufficient following we might reduce it to 10pt. The
    PD> old code would give you 100dpi or 75dpi fonts depending on which
    PD> one came first on your font path and was available at the desired
    PD> size, leading to general madness. If it bothers you enough, use
    PD> fix(X11) and change the default for the pointsize argument.

After a quite a bit discussion (incl. some own thought), I tend to vote
with Jim Lindsey: 
We *should* reduce the default font size:  Because the font size is 
relatively large, the margins (measured in characters via "mar") become
large as well, and (as Jim pointed out to some of us)
now use more than 50% of the device surface.

Fontsize = 10 (pt) looks more reasonable, to me, too.
(However, I propose to make it an option, see below).

    PD> The postscript is truly bug-ridden, but the latest snapshot should
    PD> be much better.

    >> Is there any way to set the default par options, say in Rprofile,
    >> without having a graphics window pop up at startup?

    PD> Nope, but we should probably have something like ps.options there,
    PD> the par() effect is also messing up example(): the code cannot set
    PD> ask=TRUE so multiple graphics in an example just fly by, unless the
    PD> user sets the parameter.
yes, definitely a reasonable feature request! -- see below

BUT, for a first "quick fix" : Why not change X11's argument
     pointsize = 12
     pointsize = .Options$X11pointsize
(we already have X11colortype !).

Now back to the feature request:

Do we want  par.defaults() for this?
It would have the same arguments as par()  plus additional
   device = .Options$device
with further possibility   
   device = "all"
i.e., by default,  par.defaults()  would set things only for the default
device, but there'd be a possibility to set these for all devices.

Note that
-  This would lead to considerable side effects.
   [Starting a device and setting par()s would not be portable,
    for complete portability you'd have to first set (or reset) the
-  for  device = "postscript", 
   we could allow further arguments as those of ps.options() and postscript()
   and e.g. for device = "X11" ( = default on non-gnome Unix),
   one should allow arguments of X11/x11() such as pointsize, colortype, ...


When feature requesting: What I have wanted more than once is an
     par(reset = TRUE)
which would set all the par()s back to how they were when the device was

     par.defaults(reset = TRUE)

would analogously remove all `site/user specific' par defaults
(effect: as if  par.defaults() was never set).
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