I would like to add a label on the x axis of my bar chart. Here is how I generated my bar chart in R:
x <- c(10,10,10,10,10)
y <- c(45.57, 8, 8, 14,0.5 )
barplot(y, x)
barplot(y, x, xaxt="n")
I know adding xaxt="n"
allows me to edit my labels, but when I tried the following commands, the text was squeezed into a single side of the graph and not on the corresponding bar in x-axis:
axis(side = 1,
at=1:5,
lab=c( "LT",
"LB",
"LBN",
"CD",
"MLE"
),
las=3)