Desaturate Geom Using Expression
desaturate_geom.Rd
Highlight a bar, point, or line plot based on an expression while desaturating all other data points.
Examples
df <- data.frame(locations = letters[1:5], scores = c(80,84,91,89,80))
ggplot(data = df, aes(x = locations, y = scores)) +
geom_col() +
desaturate_geom(scores==max(scores), pal = "#d55c19", desaturate = 0.7)