Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🚑 Repair layer names that might have become lost #6298

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

teunbrand
Copy link
Collaborator

This PR aims to fix #6295.

It bequeaths the 'unknown' name upon layers that have lost their names.
Reprex from issue:

devtools::load_all("~/packages/ggplot2")
#> ℹ Loading ggplot2

p <- ggplot(mpg, aes(displ, hwy)) +
  geom_point()

# To wipe out names
p$layers <- list(geom_path(), geom_path())
p <- p + geom_point() + geom_point()
names(p$layers)
#> [1] "unknown...1"    "unknown...2"    "geom_point"     "geom_point...4"

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

@teunbrand teunbrand changed the title 🚑 Repair names that might have become lost 🚑 Repair layer names that might have become lost Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Stability of layer names
1 participant