Skip to content

geom_*line() can't handle aesthetic mappings #268

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
cpsievert opened this issue Aug 17, 2015 · 1 comment
Closed

geom_*line() can't handle aesthetic mappings #268

cpsievert opened this issue Aug 17, 2015 · 1 comment
Labels

Comments

@cpsievert
Copy link
Collaborator

The following produces an empty plot:

df <- data.frame(
    m = c(1, 0, -1),
    b = c(2, -3, 0.1)
  )

  p <- ggplot(df) + xlim(c(-5, 5)) + ylim(c(-5, 5)) + 
    geom_abline(aes(intercept = m, slope = b))
ggplotly(p)

I'll add a fix for this (as well as other problems introduced by changes to ggplot2's internals in #264)

@cpsievert
Copy link
Collaborator Author

Same goes for hline and vline:

p <- ggplot(df) + xlim(c(-5, 5)) + ylim(c(-5, 5)) + 
  geom_hline(aes(yintercept = m, linetype = factor(b)))

@cpsievert cpsievert changed the title geom_abline() can't handle aesthetic mappings geom_*line() can't handle aesthetic mappings Aug 17, 2015
cpsievert added a commit that referenced this issue Sep 4, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant