I want to draw a histogram with background color. So I used geom_histogram + annotate ("rect") function. However, the color of histogram and annotate's rect is overlaying! I don't want the interruption about the color...
ggplot(fol, aes(x=dftime)) + geom_histogram(aes(x=dftime, y=..density.., color=black) + annotate("rect", xmin=20, xmax=30, ymin=0, ymax=Inf, alpha=0.2, fill="red")
I don't want the color of my histogram affected by these annotate... Is there any way to histogram forward to the rect by annotate? I know I can adjust the alpha in annotate. But even though I changed it low (0.1~0.2), it still disrupt the color of histogram...