0

I made a figure in R, but if possible, I want to change the 'width' of the steps on the X-axis. I would like to make them smaller. This is the picture: I want to change the width of the red arrows, if possible. enter image description here

And this is my code in R:

ggplot(data=Ingrepen19) +
  aes(
    x=reorder(Specialisme, -Frequentie), 
    y=Frequentie) +
  geom_bar(
    stat="identity", 
    position="dodge2") +
  ggtitle(
    label = "Specialismes in het WKZ",
    subtitle = "Aantallen uit het jaar 2020") +
  theme(
    plot.title = element_text(hjust = 0.5),
    plot.subtitle = element_text(hjust = 0.5),
    aspect.ratio=4/3) +
  xlab("Specialisme") +
  ylab("Aantallen") +
  geom_text(
    aes(label=Frequentie), 
    color="dark grey", 
    hjust=-0.5,
    size=3.5,
    inherit.aes = TRUE) +
  coord_flip()

In the meantime, the figure is more how I want it. The only comment is that by the lowest bars, the numbers are lost. How could I change that?

enter image description here

Yvonne
  • 21
  • 3

0 Answers0