Tom Bonen
2008-Sep-21 22:25 UTC
[R] suppress legend in ggplot(data, aes(y=Y, x=X,fill=Z))?
hi, is there any way to suppress the legend in ggplot(data, aes(y=Y, x=X,fill=Z)) ? i'd like the values to be displayed in different colors as specified by fill= and this works just fine. but i do not want to have the legend on the right that is automactially created when fill is specified. thanks, tom
hadley wickham
2008-Sep-23 00:53 UTC
[R] suppress legend in ggplot(data, aes(y=Y, x=X,fill=Z))?
On Sun, Sep 21, 2008 at 5:25 PM, Tom Bonen <tom.bonen at googlemail.com> wrote:> hi, > > is there any way to suppress the legend in ggplot(data, aes(y=Y, > x=X,fill=Z)) ? i'd like the values to be displayed in different colors > as specified by fill= and this works just fine. but i do not want to > have the legend on the right that is automactially created when fill > is specified.Hi Tom, + opts(legend.position = "none") should do the trick. Hadley -- http://had.co.nz/