Skip to content

Annotations with zero-length aesthetics are broken #3317

Closed
@paleolimbot

Description

@paleolimbot

In the revdep checks (#3303), an issue was identified where zero-length aesthetics in annotate() caused newly broken plots (interflex package).

library(ggplot2)
ggplot() +
  annotate("point", x = numeric(0), y = numeric(0), colour = "red")
#> Error: Elements must equal the number of rows or 1

In 3.1.1, this did not error:

library(ggplot2)
ggplot() +
  annotate("point", x = numeric(0), y = numeric(0), colour = "red")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions