Skip to content

Bug: layer(geom = "boxplot",...) produces error #6191

Closed
@davidhodge931

Description

@davidhodge931

Wondering if it was possible to make the extra args (.e.g. median.colour) added to boxplot could also available via layer?

library(tidyverse)
library(palmerpenguins)

penguins |>
  ggplot(aes(    y = flipper_length_mm,
                 x = species)) +
  geom_boxplot(
    median.colour = "red",
  )
#> Warning: Removed 2 rows containing non-finite outside the scale range
#> (`stat_boxplot()`).

penguins |>
  ggplot(aes(    y = flipper_length_mm,
                 x = species)) +
  layer(
    geom = "boxplot",
    stat = "boxplot", 
    position = "dodge2",
    params = list(median.colour = "red"),
  )
#> Warning: Ignoring unknown parameters: `median.colour`
#> Removed 2 rows containing non-finite outside the scale range
#> (`stat_boxplot()`).

Created on 2024-11-20 with reprex v2.1.1

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