Skip to content

stat_binhex hexagons appear extremely stretched if all data points fall in a single bin on y dimension #4463

Closed
@ail24

Description

@ail24

If all data points are in a single bin on the y axis (e.g. if they are all equal to 0) the hexagons appear extremely stretched vertically.

Minimal reprex:

data <- tibble(x = rnorm(1000, 20, 20), y = rep(0,1000))

data %>%
  ggplot(aes(x = x, y = y))+
  stat_binhex(bins = 100)+
  scale_x_continuous(limits = c(-100,100))+
  scale_y_continuous(limits = c(-100,100))

plot2

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugan unexpected problem or unintended behavior

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions