Skip to contents

DUNE Inspired Color Scales

Usage

scale_fill_dune(...)

scale_color_dune(...)

scale_fill_dune_discrete(...)

scale_color_dune_discrete(...)

Arguments

...

Additional arguments to pass to ggplot2::scale_[fill/color]_gradient()

Value

a ggplot scale object

Examples

library(ggplot2)

ggplot(mpg) +
  geom_point(aes(y = class, x = hwy, color = cyl)) +
  labs(title="MPG by Vehicle Type",
       caption="Source: mpg",
       x = "City Mileage",
       color ="# Cylinders") +
  theme_dune() +
  scale_color_dune()


ggplot(mpg, aes(cty)) +
geom_density(aes(fill=factor(cyl)), alpha=0.8) +
  labs(title="Density plot",
       subtitle="Mileage Grouped by cylinders",
       caption="Source: mpg",
       x="City Mileage",
       fill="# Cylinders") +
  theme_dune()+
  scale_fill_dune_discrete()