Skip to content

Should the shape scale na.value default to something? #6636

@davidhodge931

Description

@davidhodge931
library(tidyverse)

p <- palmerpenguins::penguins |>
  ggplot() +
  geom_point(
    aes(x = flipper_length_mm, y = body_mass_g, colour = sex, shape = sex),
  )

p
#> Warning: Removed 11 rows containing missing values or values outside the scale range
#> (`geom_point()`).

p +
  scale_shape_discrete(na.value = 78)
#> Warning: Removed 2 rows containing missing values or values outside the scale range
#> (`geom_point()`).

Created on 2025-09-22 with reprex v2.1.1

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