In the plot below, I was wondering to know how can I customize the labels (state names) to reduce the gap between the labels? Here is part of my code that I believe needs to be modified.
ggrepel::geom_text_repel(aes(x =Year+1.6, y = Age.Adjusted.Rate, colour = State, label = State, fontface = 'bold'), data = d_filtered_top5_fe %>%
filter(Year == max(Year)),
segment.color = 'transparent',
direction = "y",
size = 2.5)+
Try setting the
box.padding
ingeom_text_repel
lower. The default is .25.In a second step you can reduce space between overlapping text labels with the
force
argument.