mydat <- c(rep(4:10, each = 3), rep(1:2, each = 2))
barplot(table(mydat))
abline(v = 3, col = "blue")
This gives me the following plot:
I want a vertical line at x=3. However, because of the way the x-axis is spaced out, the vertical line doesn't appear to be in the right place. How can I fix this? i.e. I want my plot to look something like this:


3? - Martin Gal