Reputation: 433
I am recently introduced in R. I am trying to create a bar plot from a data frame with 51 variable names just like the following example:
By using the barplot
function I produced the following bar plot. Is there a way to display the variable names on the x-axis just like the above example:
Thanks in advance.
Upvotes: 0
Views: 4621
Reputation: 21
It can be done with cex.names
argument of barplot
function.
cex.names
determines the size for x
labels, try to write 0.1
then increase by 0.1
to check for optimal size.
For example:
barplot(x,names.arg = x_name,cex.names=0.4)
Upvotes: 2