From murdoch at stats.uwo.ca  Fri Dec  3 14:54:54 2004
From: murdoch at stats.uwo.ca (Duncan Murdoch)
Date: Fri Dec  3 14:55:01 2004
Subject: [Rd] Wishlist: simple legend options (PR#7400)
In-Reply-To: <loom.20041203T040606-378@post.gmane.org>
References: <20041202185953.A0C6AFC03@slim.kubism.ku.dk>
	<loom.20041203T040606-378@post.gmane.org>
Message-ID: <qkr0r09lj0ptup8ldkupcpghlrha3dbc2d@4ax.com>

On Fri, 3 Dec 2004 03:08:11 +0000 (UTC), Gabor Grothendieck
<ggrothendieck@myway.com> wrote :

> <epurdom <at> stanford.edu> writes:
>
>: 
>: Full_Name: Elizabeth Purdom
>: Version: 1.9.1
>: OS: Windows XP
>: Submission from: (NULL) (171.64.102.199)
>: 
>: It would be nice if legend had the option of some default locations you could
>: choose instead of entering specific coordinates, like "topleft",
>: "topright","topcenter", etc. based on par("usr") coordinates. I know I've 
>wanted
>: it so often I've made my own simple non-robust wrap-around, so I don't have 
>to
>: remember or parse the xjust and yjust options necessary to make it work. Of
>: course there should be the option of entering in your own coordinates. 
>
>Check out smartlengend in package gtools which is part of the gregmisc
>bundle.  I agtee its a useful feature and it would be nice if that
>feature migrated to the base graphics.

I've put both the title and keyword placement of the legend into
legend() now, in R-devel.  I was unaware of the smartlegend() function
(which is actually in gplots); I've just now added an "inset"
parameter like it has.  The specification for the location is slightly
different than smartlegend() uses.  Because legend() handles the
second parameter in a strange way and I didn't want to fiddle with
that, I put the specification entirely in the first parameter:  you
say you want the legend at one of "bottomright", "bottom",
"bottomleft",  "left", "topleft", "top", "topright",
"right", or "center".

This should be downloadable tomorrow from the CRAN mirrors.

Duncan Murdoch


[Rd] Wishlist: simple legend options (PR#7400)
Duncan Murdoch