ggplot with conditions

The way you currently have things, fill_col is just another variable, as opposed to an _ aesthetic value_ that's evaluated by ggplot as a fill colour. See, for example the StackOverflow thread, below:

There's an example included in the community thread, below, that shows you how to use a colour palette with specific colours matched to specific values using a named vector:

1 Like