[R] How to get legend outside of plot?

jimdare jamesdare26 at gmail.com
Wed Jan 14 04:57:21 CET 2009


I also have this problem!  I would be great to hear a solution.



Mike Williamson-9 wrote:
> 
>     I am creating a CDF plot function more user-friendly than any default
> r
> function.  Depending upon the bimodality of the data (it is often
> bimodal),
> or any other strange data trends, the points can end up gathering in just
> about any corner of the plot.  So, when I add a legend, whether I choose
> to
> add it in the bottom right, top left, or wherever, it will sometimes end
> up
> putting the legend right on the data itself.  So, I tried to force the
> legend to certain data values (e.g., the largest in x & the smallest in y,
> to "really" get the bottom right), but then this means most of the legend
> is
> missing because it is outside of the "plot region".
>     How can I create a legend that is fully outside of the plot, similar
> to
> what excel does by default, for example?
> 
>                                                   Thanks!
>                                                       Mike
> 
> 	[[alternative HTML version deleted]]
> 
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
> 
> 

-- 
View this message in context: http://www.nabble.com/How-to-get-legend-outside-of-plot--tp21448346p21449657.html
Sent from the R help mailing list archive at Nabble.com.




More information about the R-help mailing list