Skip to content

Zero length breaks no longer work with discrete positional scales #4008

@cpsievert

Description

@cpsievert

With current CRAN version, this code produces:

ggplot(PlantGrowth, aes(x = group, y = weight)) + 
  geom_boxplot() + 
  scale_x_discrete(breaks = NULL)

image

With GH version (likely introduced by 7e5ff92, cc @thomasp85), this code produces an error:

Error: `mapped_discrete` objects can only be created from numeric vectors

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions