legend in bubble plots made with symbols()

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

legend in bubble plots made with symbols()

Denis Chabot
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

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Reply | Threaded
Open this post in threaded view
|

Re: legend in bubble plots made with symbols()

Frank Harrell
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

library(Hmisc)
?xYplot

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

Frank

>
> ______________________________________________
> [hidden email] 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

______________________________________________
[hidden email] 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 Harrell
Department of Biostatistics, Vanderbilt University
Reply | Threaded
Open this post in threaded view
|

Re: legend in bubble plots made with symbols()

Roger Bivand
In reply to this post by Denis Chabot
On Sat, 18 Mar 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()...
>

There is a recent paper in JSS by Susumu Tanimura, Chusi Kuroiwa, and
Tsutomu Mizota, including some legend code:

http://www.jstatsoft.org/

Volume 15, 2006, Issue 5

> Thanks in advance,
>
> Denis Chabot
>
> ______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>

--
Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Helleveien 30, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: [hidden email]

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Roger Bivand
Department of Economics
NHH Norwegian School of Economics
Helleveien 30
N-5045 Bergen, Norway