man/examples/theme_bar_dft_gradient.R

## More complex bar chart with another dft palette selected and gradient used.

library(ggplot2)

df <- mpg[mpg$class %in% c("subcompact", "compact", "midsize", "suv"),]

ggplot(df, aes(manufacturer)) +
  geom_bar(aes(fill=class), width = 0.5) +
  theme_bar_dft(flip = TRUE, legend_position = "top", palette = "just.beachy", gradient = TRUE)
department-for-transport/dftplotr documentation built on April 3, 2024, 3:55 p.m.