library(ggplot2)
df0 <- data.frame(index=as.numeric(1:10),count = round(runif(10,1,10)))
ggplot(df0,aes(index,count)) + geom_col()
Okay that is what I expect. Now, let's add 0.5 to each x-axis value so we have a non-integer scale (note I used as.numeric() above to the x-axis is not an integer type.)
df0$index <- df0$index + 0.5
ggplot(df0,aes(index,count)) + geom_col()
Can someone tell me what is going on here. This plot is a mutant! Thanks.