0

enter image description hereIn the attached image for a Shannon diversity bar graph, the bar names/labels are not shown for each individual bar. Some are missing. The code I am using is just the basic barplot

barplot(
shannon[all], las = 2,
names.arg = paste(sample_type[all], sample_name[all])
)

How can I make the font size smaller and/or make the names angled to leave more room?

  • 2
    Use `cex.axis=` argument, please read documentation `help('barplot')`. – jay.sf Mar 12 '22 at 10:57
  • Hi, I tried using cex.axis = 45 and it did not angle the text. Instead it just adds a black half-circle to the left margin? – Dora Explorer Mar 12 '22 at 11:13
  • You can find some help [here](https://stackoverflow.com/questions/9981929/how-to-display-all-x-labels-in-r-barplot) as well. – Vishal A. Mar 12 '22 at 11:44

0 Answers0