Skip to content

stat_summary_bin gives 1 bin more than specified. #3824

Closed
@JoFAM

Description

@JoFAM

stat_summary_bin() consistently gives one more bin than specified in the function call

ggplot(data=mtcars, aes(y=mpg,x=wt)) +
  stat_summary_bin(fun.y = "mean", geom = "point",
                   bins = 3)

This shows 4 points. If you change bins to 4, it'll show 5 points and so on.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugan unexpected problem or unintended behaviorlayers 📈

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions