I want to create a histogram in R. My code is:
hist(P1_Pre_Benefits, main="Pre survey Benefits", xlab="",
col="lightgreen", breaks=c(0.5,1.5, 2.5, 3.5, 4.5, 5.5), xaxt="n", xlim=c(1, 6), ylim=c(0, 45))
axis(side=1, at=seq(1, 5, 1),
labels=c("1", "2", "3", "4", "5"))
This works, however, the first bar is too close to the y axis, I would like a space here. Anyone know how to solve this?