library(ggplot2)
library(dplyr)
x <- mtcars |>
count(cyl, am) |>
mutate(am = as.factor(am))
ggplot(x, aes(x = cyl, y = n, fill = am)) + # you need a fill aesthetic
geom_col() +
scale_fill_manual(values = tntp_palette())
Run the code above in your browser using DataLab