From ihaka@stat.auckland.ac.nz  Wed Aug 13 01:01:09 1997
From: ihaka@stat.auckland.ac.nz (Ross Ihaka)
Date: Wed, 13 Aug 1997 12:01:09 +1200 (NZST)
Subject: R-alpha: R 0.50.a3: title( .. adj= x)  AND  mtext( .. adj= x)
In-Reply-To: <x2g1sf2fhp.fsf@bush.kubism.ku.dk>
References: <199708121416.QAA02795@sophie.ethz.ch>
 <x2g1sf2fhp.fsf@bush.kubism.ku.dk>
Message-ID: <199708130001.MAA04180@stat1.stat.auckland.ac.nz>

Peter Dalgaard BSA writes:
 > (ever tried to produce plots with different scales but the legends in
 > the exact same spot?).

There is a barely documented (and nearly forgotten) R "feature" which you
might find useful ...

The functions xinch() and yinch() convert inches (xcm() and ycm() are
left as an exercise) to "usr" coordinates.

For example, to plot a point half an inch up from the lower left
corner of a plot you can use:

	ll <- par("usr")[c(1,3)] + c(xinch(0.5), yinch(0.5))
	points(ll[1], ll[2])

The same trick works for placing legends in "usr" coordinates.
	Ross


PS: I am making the "adj" feature behave like S.  Again this was
ignorance on my part, not malice.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
r-devel 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-devel-request@stat.math.ethz.ch
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-


R-alpha: R 0.50.a3: title( .. adj= x) AND mtext( .. adj= x)
Ross Ihaka