Without adding an extra column to the data.frame, is there a built-in way to highlight the min/max bar? In the following example, I’d like the Joe bar to be green (max) and the John bar to be red (min).
I’m sure this has been asked before, but I couldn’t find when searching:
data= data.frame( Name = c("Joe","Jane", "John") , Value = c(3,2,1) )
ggplot(data=data)+geom_bar(aes_string(x="Name",y="Value"), stat="identity" )
You can use subsetting: