Closed
Description
I don't know if this should be a valid way to change the internal ggproto
value (avoid modifying the data in place)
library(ggplot2)
p <- ggplot(mtcars) +
geom_point(aes(wt, mpg))
# I want to ensure the coordinate always has clip = "off"
if (!identical(p$coordinates$clip, "off")) {
# to prevent from changing the input of user.
p$coordinates <- ggproto(NULL, p$coordinates, clip = "off")
}
print(p)
#> Error in super() : node stack overflow
Created on 2024-10-11 with reprex v2.1.0
~
Metadata
Metadata
Assignees
Labels
No labels