# NOT RUN {
data(popeurope)
dumbbell_chart(popeurope, country, pop1952, pop2007)
# Display only the top 10 countries in terms of population in 2007
dumbbell_chart(popeurope, country, pop1952, pop2007, top_n = 10)
# Change line and point color
dumbbell_chart(popeurope, country, pop1952, pop2007, top_n = 10,
line_color = "lightgray", point_color = c("lightgray", "black"))
# Add custom legend labels
dumbbell_chart(popeurope, country, pop1952, pop2007, top_n = 10,
legend_labels = c("1952", "2007"))
# Increase line width and point size
dumbbell_chart(popeurope, country, pop1952, pop2007, top_n = 10,
line_size = 2, point_size = 5)
# }
Run the code above in your browser using DataLab