How do I flip the default ordering of colors which ggplot picks for factor variable passed onto 'fill' aesthetic. (Here, I have a factor variable with two levels Won
and Lost
).
Ref image below, I'd like this 'red-family' shade to go with Lost
; As it is, 'red' gets used for Won
category instead of Lost
, which in my view doesn't gel with one's common intuition of colors.
ggplot(data, mapping = aes(x = Party, y = Votes, fill = Result)) +
geom_bar(stat = "identity", width = .6)
Votes scored by Political Parties in Indian State of TamilNadu: