suppressPackageStartupMessages(
library('tidyverse')
)library('palmerpenguins')
|>
penguins group_by(species) |>
mutate(cumedist = cume_dist(body_mass_g)) |>
ggplot(aes(x = body_mass_g, y = cumedist, color = species)) +
geom_step(direction = 'vh') +
scale_color_brewer(palette = 'Set2') +
theme_minimal(base_size = 16)
dplyR has as cume_dist
function
tidyverse
dplyr
Useful for making ECDF charts in combination with geom_step
.