Skip to contents

This vignette is intended to demonstrate the breadth of scale_duke_continuous() and its various applications. Similar to the other existing color scale functions, this function can be applied to all ggplot2 visualizations.

For these visualizations, we will use the R dummy data set palmerpenguins.

Plot Examples

Scatter Plots

plot <- ggplot2::ggplot(palmerpenguins::penguins, ggplot2::aes(bill_length_mm, flipper_length_mm)) +
  ggplot2::geom_point(ggplot2::aes(colour = bill_length_mm)) +
  ggplot2::labs(title = "Bill Length vs. Flipper Length", caption = "There are three different species of penguins.", x = "Bill Length (mm)", y = "Flipper Length (mm)")

plot + 
  scale_duke_continuous()
#> Warning: Removed 2 rows containing missing values (`geom_point()`).