[R] graphics

Sarah Goslee sarah.goslee at gmail.com
Wed Oct 7 23:44:27 CEST 2009


On Wed, Oct 7, 2009 at 2:01 PM, McDonald, Grant
<grant.mcdonald08 at imperial.ac.uk> wrote:
> Dear Sir,

Well, I'm not a "sir" but perhaps I can help anyway.

> Is it possible to place the legend out side of figure axes on the white area around all three panels?
> Any help would be greatly appreciated.

Like this:

plot(1:10, 1:10)
legend(locator(), "nothing", pch=1)

Or instead of locator(), a function that lets you use a mouse click to select
a point, you can use par("usr") to learn the current coordinate system,
and select a value outside of that range.

Sarah Goslee

More information about the R-help mailing list