I want to shade the area between the grouped lines. I've tried different approaches but I don't manage to do it.
df <- data.frame(year = rep(c(1950:1955), each = 2),
gender = factor(rep(c("male", "female"), times = 6)),
value = c(40526812, 37450509, 43027405,
40135682, 45801088, 43130369,
48579427, 46077640, 50948574,
48493786, 53052094, 50537984))
df |>
ggplot(aes(year, value, group = gender)) +
geom_line()
Thanks in advance!