I'm trying to make a histogram where the bars are transparent so that you can see the background. Here is the code:
library(ggplot2)
theme_dark <- function( ... ) {
theme(
text = element_text(color="gray90"),
plot.background=element_rect(fill="gray8",color="gray8"),
panel.background=element_rect(fill="gray10",color="gray10"),
panel.grid.major = element_line(colour="gray17"),
panel.grid.minor = element_line(colour="gray12"),
axis.line = element_line(color = "gray50"),
plot.title = element_text(color="gray80"),
axis.title = element_text(color="gray70"),
axis.text = element_text(color="gray30"),
legend.key = element_rect(fill="gray10")
) + theme(...)
}
p <- qplot(rating, data=movies)
p + theme_dark() + geom_histogram(colour = "turquoise3", fill="turquoise4", alpha = 0.33)
However, the transparancy seems to reveal dark grey histogram bars, and does not show the background at all. The template does not seem to specify this, so I'm not quite sure what is going on.
Hence - how can I make the bars transparent so that I can see the background?