Hi. The following creates a small column chart. Suppose I have four small images by President, e.g. lincoln.jpg . How could I replace the x axis names with those images? Thank you.
suppressMessages(library(dplyr))
suppressMessages(library(ggplot2))
df <- data.frame(President = c("Lincoln", "Garfield", "McKinley", "Kennedy"),
Days_in_office = c(1503,199,1654,1036) )
df %>%
ggplot() +
geom_col(mapping=aes(President, y=Days_in_office, fill=President)) +
scale_fill_manual(values=c("blue", "yellow", "red", "black")) +
labs(title="Days in Office Before Presidential Assassination")