[R] ggplot2 legend text....a basic question

Julian Burgos jmburgos at u.washington.edu
Mon Sep 14 19:14:13 CEST 2009

Hello fellow R's, 

I´ve been learning to use the ggplot2 library, and after a full day of 
work I still have a couple of basic questions.
Here is an example:

ggplot(mydata, aes(x, y))   + geom_point(aes(size = n)) + 

In this plot, the points are labeled as "n" (the name of the variable) 
and the polygon is labeled as "0.5" (the alpha value used).   My 
questions are:
a) How to change the text  in the legend (for example, "number" instead 
of "n").
b) How to avoid having a  legend for the polygon?
Many thanks,


Julian Mariano Burgos
Hafrannsóknastofnunin/Marine Research Institute
Skúlagata 4, 121 Reykjavík, Iceland
Sími/Telephone : +354-5752037
Bréfsími/Telefax:  +354-5752001
Netfang/Email: julian at hafro.is, jmburgos at u.washington.edu

More information about the R-help mailing list