Home > other >  increase space for axis labels ggplot
increase space for axis labels ggplot

Time:12-08

I am generating a barplot using ggplot which looks like this: enter image description here As you can see, the axis labels are very squished. Because the actual barplot itself doesn't add much information, I would like to decrease the size of it (for example to the size of the area indicated with the green line above the plot), while simultaneously giving more space to the axis label (blue line in the plot), so I can do the line break after 50 characters instead of 30. I tried to change the plot.margin and played around with the hjust argument of the theme function, but didnt manage to accomplish what I want.

I would very much appreciate any help you can offer!

CodePudding user response:

We could tweak with plot.margin in theme() and element_text() as already answered enter image description here

  • Related