Continuous fill scale based on OMNI colors
Examples
library(ggplot2)
library(dplyr)
#>
#> Attaching package: ‘dplyr’
#> The following objects are masked from ‘package:stats’:
#>
#> filter, lag
#> The following objects are masked from ‘package:base’:
#>
#> intersect, setdiff, setequal, union
mpg_summary <- mpg |>
group_by(class) |>
summarise(avg_hwy = mean(hwy))
ggplot(mpg_summary, aes(x = class, y = avg_hwy, fill = avg_hwy)) +
geom_bar(stat = "identity") +
scale_fill_omni_continuous()
#> Error in scale_fill_omni_continuous(): argument "palette" is missing, with no default