[R] legend in bubble plots made with symbols()

Frank E Harrell Jr f.harrell at vanderbilt.edu
Sat Mar 18 21:45:38 CET 2006

Denis Chabot wrote:
> Hi,
> I have read about the use of symbols() to draw circles of different  
> sizes, but I have not been able to find out how to add a legend to  
> such a graph, legend that would display some specific sizes and their  
> meaning.
> Before finding the symbols function in Paul Murrell's book, I had  
> rolled by own function where the variable I want to use to control  
> circle size was actually used to control cex. I was able to draw a  
> legend afterward. Symbols seems a bit simpler and I wanted to see if  
> it would be better than my own function. But without legend it is  
> less useful. However I'm sure there is a way which I'm not aware of  
> to draw a legend for a plot drawn with symbols()...
> Thanks in advance,
> Denis Chabot


See the size argument and the use of the skey function that is generated 
by xYplot.


> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Frank E Harrell Jr   Professor and Chair           School of Medicine
                      Department of Biostatistics   Vanderbilt University

More information about the R-help mailing list