Rotating x axis labels in R for barplot

后端 未结 8 655
暖寄归人
暖寄归人 2020-11-27 12:29

I am trying to get the x axis labels to be rotated 45 degrees on a barplot with no luck. This is the code I have below:

barplot(((data1[,1] - average)/averag         


        
8条回答
  •  眼角桃花
    2020-11-27 12:41

    You can use ggplot2 to rotate the x-axis label adding an additional layer

    theme(axis.text.x = element_text(angle = 90, hjust = 1))
    

提交回复
热议问题