Skip to content

stat_summary_bin expects some binning arguments (e.g., bins) but not others (e.g., breaks) #2214

Closed
@jwdink

Description

@jwdink

I'd like to pass "breaks" to stat_summary_bin, but this doesn't seem to work as expected, despite other binning arguments working.

set.seed(32)
library("ggplot2")
df <- data.frame(x = rnorm(1000), y = rnorm(1000))

ggplot(df, aes(x = x, y = y)) + stat_summary_bin(breaks = seq(-3, 3, by = 0.5))
#> Warning: Ignoring unknown parameters: breaks
#> No summary function supplied, defaulting to `mean_se()
#> Warning: Removed 1 rows containing missing values (geom_pointrange).

ggplot(df, aes(x = x, y = y)) + stat_summary_bin(bins = 12)
#> No summary function supplied, defaulting to `mean_se()

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions