[R] troubles with displaying legend on the plot
spencer.graves at pdf.com
Wed Apr 16 15:44:38 CEST 2003
Another trick (which I think I got from Modern Applied Statistics with
S) is to compute xlim manually and add 20% or 50% on the right or left
to create the blank space you want for the legend.
Dirk Eddelbuettel wrote:
> 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
More information about the R-help