> Three questions: > 1a) Why does the following code not produce transparent bars?
Because you're setting the fill colour (not mapping it to a variable in your dataset), the fill needs to be outside of aes() g + geom_histogram(aes(x=log(BNCw)), fill = alpha("red", .5)) + geom_histogram(aes(x=log(BNCc)), fill = alpha("blue", .5)) > 1b) How can I manually specify the elements of the legend for this > version of the plot? Use the "manual" scale: g + geom_histogram(aes(x=log(BNCw), fill = "w")) + geom_histogram(aes(x=log(BNCc), fill = "c")) + scale_fill_manual("BNC type", values = alpha(c("red","blue"), 0.5)) Hadley -- http://had.co.nz/ ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.