Closed
Description
This problem was identified in #6287 and affects 7 packages.
In #5967 we gave layers names. However, some packages insist in manually managing the plot$layers
field, which can cause names to disappear. We don't have a good fallback for this situation, but we should. Generally this tends to become a problem after adding >1 layer.
devtools::load_all("~/packages/ggplot2")
#> ℹ Loading ggplot2
p <- ggplot(mpg, aes(displ, hwy)) +
geom_point()
# To wipe out names
p$layers <- list(geom_path())
p + geom_point() + geom_point()
#> Error:
#> ! Names repair functions can't return `NA` values.
Created on 2025-01-22 with reprex v2.1.1
Metadata
Metadata
Assignees
Labels
No labels