[R] par(uin)

Martin Maechler maechler at stat.math.ethz.ch
Mon Oct 25 16:58:06 CEST 1999

>>>>> On Fri, 22 Oct 1999 10:29:09 -0700 (PDT), "Gregory R. Warnes" <warnes at biostat.washington.edu> said:

    Greg> I've been trying to use several plotting routings that make use
    Greg> of S's par("uin"), the number of user units per inch.  For the
    Greg> moment I've substituted all of the occurences of this with

    Greg>    par.uin _ function() 
    Greg> 	(par("fin") / c(diff(par("xaxp")[1:2]),diff(par("yaxp")[1:2])))

    Greg> This seems to work fine for my needs.

Thank you Greg!

Well, your solution certainly is sub-optimal, since  the ?axp parameters
really give coordinates of outermost axis labels, instead of the plotting
region, and "fin" is the figure's not the plot's region;
i.e. rather, you'd use

  par.uin <- function() 
      par("pin") / {u <- par("usr"); c(diff(u[1:2]), diff(u[3:4]))}

BTW: "uin" gives  ``inches per usr unit'' (not the reverse as you suggest).

Should `R' provide "uin" (as read-only) par() ?

Martin Maechler <maechler at stat.math.ethz.ch>	http://stat.ethz.ch/~maechler/
Seminar fuer Statistik, ETH-Zentrum  LEO D10	Leonhardstr. 27
ETH (Federal Inst. Technology)	8092 Zurich	SWITZERLAND
phone: x-41-1-632-3408		fax: ...-1228			<><
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