Intro Thoughts

Status Quo

library(tidyverse)
library(ggwipe)

# data + aes ggplot object
p0 <- faithful |>
  ggplot() + 
  aes(x = waiting) + labs(x = 'wait time (min)') + 
  aes(y = eruptions) + labs(y = 'erupt time (min)') + 
  geom_point()

# plot 1
p0 + 
  geom_density2d() 

# plot 2
p0 + 
  geom_density2d_filled(alpha = .5) 

# plot 3
p0 + 
  ggdensity::geom_hdr() 

Experiment

library(tidyverse)
library(ggwipe)
palmerpenguins::penguins |>
  ggplot() + 
  aes(x = bill_length_mm) + labs(x = 'wait time (min)') + 
  aes(y = bill_depth_mm) + labs(y = 'erupt time (min)') + 
  geom_density2d() + 
  aes(color = species)
## Warning: Removed 2 rows containing non-finite outside the scale range
## (`stat_density2d()`).
last_plot_wipe() + 
  ggdensity::geom_hdr() +
  aes(fill = species)
## Warning: Removed 2 rows containing non-finite outside the scale range
## (`stat_hdr()`).

Closing remarks, Other Relevant Work, Caveats