Closed
Description
In the below example, the legend key for female should be red with a black border.
I'm using the latest DEV version of ggplot2. It works correctly in 3.4.4.
library(tidyverse)
library(palmerpenguins)
penguins |>
mutate(sex = factor(sex)) |>
filter(sex == "male") |>
ggplot() +
geom_violin(aes(
x = sex,
y = body_mass_g,
fill = sex,
)) +
scale_fill_manual(values = c("red", "blue"), drop = FALSE)
Created on 2023-12-15 with reprex v2.0.2
Metadata
Metadata
Assignees
Labels
No labels