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

Ross Ihaka ihaka@stat.auckland.ac.nz
Wed, 13 Aug 1997 12:01:09 +1200 (NZST)

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.

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