[R] A ggplot question

Matthieu Dubois matthdub at gmail.com
Wed Dec 2 16:32:27 CET 2009


Hi Megh, 

just set the legned position to 'none' using options, by putting
 + opts(legend.position="none") after your code. 

ggplot(diamonds, aes(carat, ..density..)) + 
geom_histogram(binwidth = 0.2, aes(fill = cut)) + 
facet_grid(. ~ cut) + 
opts(legend.position="none")

HTH, 

Matthieu




More information about the R-help mailing list