I need to increase the spacing between my labels on the y-axis (see picture below). I have also included the code that I have used to make the plot in ggplot2.
Thanks for your help!
ggplot(who6, aes(total_cases, country)) geom_col(width = .25, position = position_dodge(width = 60*60*24))
CodePudding user response:
Try this:
guide_axis(n.dodge = 2)
It should alternate the horizontal placement of the labels so they don't overlap.
CodePudding user response:
I reproduced your example, but in the next time don't forget to add it by yourself.
I think, you should do that:
***
plot_new <- ggplot(who6, aes(total_cases, country))
geom_col() theme (axis.text.x = element_text(margin = unit(c(0, 0, 0, 0), "mm"), angle = 90)) coord_flip()
***
Now your plot will look better: