[R] graphics

Peter Dalgaard BSA p.dalgaard at biostat.ku.dk
Wed Dec 1 19:28:24 CET 1999


Martin Maechler <maechler at stat.math.ethz.ch> writes:

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

Which is a mess! We also have

.PostScript.Options$pointsize

So wouldn't it be more obvious to use

.X11.Options$pointsize

(and set it with X11.options(pointsize=12))?

If we go to 10pt default, we also need to discuss the multiframe
scaling issue. The current rules are that if there is two rows and/or
columns, reduce font size to 80%, if there are three or more reduce to
50% and a 5pt font @100dpi is a tad small. Note that this rule is
*device independent*, so one would have to check that it still looks
reasonable on postscript and windows. I think it works out OK if one sets the
rule to 60% giving a 6pt font, but I'd like someone elses eyes on
that. 

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

Hmm. I'm not so sure we're really gaining much from an elaborate
par.default() function. If one desires, one could do it via the
startup function, simply by a call to par based on the options).

For instance, try changing X11 to

X11<-function (display = "", width = 7, height = 7, pointsize = 12, 
    gamma = 1, colortype = options()$X11colortype, maxcubesize = 256) 
{
    .Internal(X11(display, width, height, pointsize, gamma, colortype, 
    maxcubesize))
    par(ask=T)
}

and then

example(barplot)
dev.off()
par(ask=F)
example(barplot)

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