Skip to content

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

Closed

Description

@cpsievert

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)

Activity

  1. added a commit that references this issue on Aug 17, 2015
    81b8404
  2. cpsievert commented on Aug 17, 2015

    @cpsievert
    CollaboratorAuthor

    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)))
  3. changed the title [-]geom_abline() can't handle aesthetic mappings[/-] [+]geom_*line() can't handle aesthetic mappings[/+] on Aug 17, 2015
  4. added a commit that references this issue on Sep 4, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions