Skip to content

Wrong x range when using coord_cartesian() with zero range xlim and expand=FALSE #3531

Open
@wch

Description

@wch

When coord_cartesian() is called a zero-range xlim and expand=FALSE, the x value appears to be treated as a factor, and all points are in the plot.

ggplot(mtcars, aes(wt, mpg)) +
  geom_point() +
  coord_cartesian(xlim = c(5, 5), expand = FALSE)

image

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions