I'm making a straightforward barchart in R using the ggplot2 package. Rather than the grey default I'd like to divide the background into five regions, each a different (but similarly understated) colour. How do I do this?
More specifically, I'd like the five coloured regions to run from 0-25, 25-45, 45-65, 65-85 and 85-100 where the colours represent worse-than-bronze, bronze, silver, gold and platinum respectively. Suggestions for a colour scheme very welcome too.
I wanted to move the line⎯or the bars of the histogram⎯to the foreground, as suggested by baptiste above and fix the background with
+ theme(panel.background = element_rect(), panel.grid.major = element_line( colour = "white") )
, unfortunately I could only do it by sending thegeom_bar
twice, hopefully someone can improve the code and make the answer complete.Produces this,
Take a look at this site for colour scheme suggestions.
Here's an example to get you started: