Closed topepo closed 3 years ago
Modifying the function to the following solves the issue:
maybe_modify_mapping <- function(x) {
has_mapping <- any(names(x) == "mapping")
is_point <- is_geom_point(x)
if (has_mapping & is_point) {
x$mapping <- utils::modifyList(
x$mapping %||% list(),
ggplot2::aes(customdata = .config)
)
}
x
}
This issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: https://reprex.tidyverse.org) and link to this issue.
The function
maybe_modify_mapping()
adds a new aesthetic mapping to an existing ggplot object.There is a bug where, for some
autoplot()
results, the mapping that we want to modify is NULL:If there is a
geom_point()
with a local NULL mapping, we should make a new mapping withcustomdata = .config
.