hadley/ggplot2 — Issue #361: geom_abline is too short when used with coord_flip
Author: wch
Created: 2012-01-19 07:53:33+00:00
State: open

This is based on a post on the mailing list.

`geom_abline` doesn't go all the way across the plotting area. It seems to depend on the y range.

```R
dat <- data.frame(x=LETTERS[1:6], y=1:6)

# Almost all the way from bottom to top
ggplot(dat, aes(x=x, y=y)) + geom_bar() +
geom_abline(intercept = .8, slope = 0, colour = "red") +
coord_flip()

# With y=y/6, the line is very short
ggplot(dat, aes(x=x, y=y/6)) + geom_bar() +
geom_abline(intercept = .8, slope = 0, colour = "red") +
coord_flip()
```