data(Breslau)
# Reproduce Figure 1 in Bellhouse (2011)
# He excluded age < 5 and made a point of the over-representation of deaths in quinquennial years.
library(ggplot2)
library(dplyr, warn.conflicts = FALSE)
Breslau5 <- Breslau |>
  filter(age >= 5) |>
  mutate(div5 = factor(age %% 5 == 0))
ggplot(Breslau5, aes(x=age, y=total), size=1.5) +
  geom_point(aes(color=div5)) +
  scale_color_manual(labels = c(FALSE, TRUE), 
                     values = c("blue", "red")) +
  guides(color=guide_legend("Age divisible by 5")) +
  theme(legend.position = "top") +
  labs(x = "Age current at death",
       y = "Total number of deaths") +
  theme_bw()
Run the code above in your browser using DataLab