Re: [R] position of a legend-object

From: Duncan Murdoch <>
Date: Fri 10 Jun 2005 - 04:25:57 EST

On 6/9/2005 1:05 PM, Carsten Steinhoff wrote:
> Hello,
> I've written a function that plots a few functions in a diagram.
> The xlim and or ylim is not always the same, and set automatically by R.
> A legend is part of this object.
> Now the problem is: where to put the legend? Me would help a function that
> returns the limits and scaling of the axis.

Besides the suggestions other have sent, you might find something like

legend("topright", ...)

(which puts it at the top right of the plot) does what you want.

This keyword positioning was new in 2.1.0.

Duncan Murdoch mailing list PLEASE do read the posting guide! Received on Fri Jun 10 04:32:44 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:32:28 EST