I use ggplot and geo_bar to produce a plot, results is this:

Code
# Faceting is a good alternative:
ggplot(df.cnts, aes(x=date,y=freq)) + geom_bar(stat="identity") +
facet_wrap(~ operator, nrow = 3) +
theme(axis.text.x = element_text(angle=90, vjust=0.5, size=8))
Question
Can I have code that colors all bars in which the value is above 1000.
thx
mt_mean <- mtcars %>% group_by(cyl) %>% summarise(avg_mpg = mean(mpg) )
ggplot( mt_mean , aes(x=cyl, y =avg_mpg)) +
geom_bar(stat = 'identity', aes(fill = avg_mpg > 25 ) )
g + scale_fill_manual(values = c('red', 'black') )
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With