In base R, the barplot function easily creates a barplot but if the number of bars is large or we can say that if the categories we have for X-axis are large then some of the X-axis labels are not shown in the plot. Therefore, if we want them in the plot then we need to use las and cex.names.
Consider the below data and bar graph −
> x<-sample(1:5,20,replace=TRUE) > names(x)<-rep(c("IN","CO","LA","NY"),times=5) > barplot(x)
Showing all the X-axis labels −