library(tidyverse)
palmerpenguins::penguins |>
ggplot() +
geom_point(
aes(x = flipper_length_mm,
y = body_mass_g,
shape = species),
) +
theme(palette.shape.discrete = c(21, 24, 22))
#> Error in `as_discrete_pal()`:
#> ! Cannot convert `x` to a discrete palette.
palmerpenguins::penguins |>
ggplot() +
geom_path(
aes(x = flipper_length_mm,
y = body_mass_g,
linetype = species),
) +
theme(palette.linetype.discrete = c(1, 2, 3))
#> Error in `as_discrete_pal()`:
#> ! Cannot convert `x` to a discrete palette.
Created on 2025-09-22 with reprex v2.1.1