Closed
Description
In guide training this assumption is made:
Lines 416 to 417 in 25f54d9
I found out that you can violate this assumption as follows, where the first scale has 2 aesthetics and the second scale has 1 aesthetics.
devtools::load_all("~/packages/ggplot2")
#> ℹ Loading ggplot2
packageVersion("ggplot2") # current main branch
#> [1] '3.4.3.9000'
df <- data.frame(x = (1:3)/3, z = c("red", "blue", "green"))
ggplot(df) +
aes(x, z, colour = z, fill = z, size = x) +
geom_point() +
scale_discrete_identity(aesthetics = c("colour", "fill")) +
scale_size_identity()
#> Warning in mapply(FUN = f, ..., SIMPLIFY = FALSE): longer argument not a
#> multiple of length of shorter
Created on 2023-09-18 with reprex v2.0.2
This is probably worth fixing and guaranteeing the assumption more.
Metadata
Metadata
Assignees
Labels
No labels