diff --git a/R/labels.R b/R/labels.R index 3012868874..2bc5551034 100644 --- a/R/labels.R +++ b/R/labels.R @@ -24,9 +24,11 @@ setup_plot_labels <- function(plot, layers, data) { # Find labels from every layer for (i in seq_along(layers)) { layer <- layers[[i]] + exclude <- names(layer$aes_params) mapping <- layer$computed_mapping mapping <- strip_stage(mapping) mapping <- strip_dots(mapping, strip_pronoun = TRUE) + mapping <- mapping[setdiff(names(mapping), exclude)] # Acquire default labels mapping_default <- make_labels(mapping)