I have this code to create a graph shown below. I found most of this code in an answer to a previous question in which the graph is very similar to mine (at the bottom of the page).
> x = ggplot(df, aes(x=Year, y=NAO_Index, width=.8)) +
geom_bar(stat="identity", aes(fill=NAO_Index>0), position='identity') +
theme_bw() + scale_fill_discrete(guide='none') +
ylab("NAO Index") +
ggtitle("NAO Index between 1860 and 2050") +
scale_x_continuous(breaks=c(seq(1860,2050,10)))
How do I adapt this so the bars with a positive NAO index (i.e. currently blue) are red, and those below blue?
I'm sure this is likely an easy solution but I'm very new to R and can't figure it out! Many thanks in advance.