[R] troubles with displaying legend on the plot

Dirk Eddelbuettel edd at debian.org
Wed Apr 16 13:46:57 CEST 2003

On Wed, Apr 16, 2003 at 12:26:11PM +0400, Wladimir Eremeev wrote:
> Is is possible to place the legend outside a plot in any other way
> except using lattice package?

Sort of -- I once did that using layout(). In essence you arrange two (or
more) plots on a page. One of those plots remains 'empty' and only contains
a legend, which gives the desired of having a plot with a separate legend.

> BTW, maybe it would be useful to place this question in FAQ?
> I've searched the mail archive. The question about placing the legend
> outside a plot already have arose...

This was discussed before. Simply trying one google query as in
shows several results, including one with the simpler answer

Hope this helps, Dirk

Wishful thinking can dominate much of the work of a profession for a decade,
but not indefinitely.   -- Robert Shiller, on Efficient Markets models, 2002

More information about the R-help mailing list