# NOT RUN {
library(ggplot2)
df <- data.frame(country = c(
"India", "India", "India",
"Sweden", "Sweden", "Sweden",
"Germany", "Germany", "Germany",
"Finland", "Finland", "Finland"),
year = c(2011, 2012, 2013,
2011, 2012, 2013,
2011, 2012, 2013,
2011, 2012, 2013),
rank = c(4, 2, 2, 3, 1, 4, 2, 3, 1, 1, 4, 3))
ggplot(df, aes(year, rank, color = country)) +
geom_point(size = 10) +
geom_bump(size = 2)
# }
Run the code above in your browser using DataLab