@@ -84,8 +84,8 @@ setup_plot_labels <- function(plot, layers, data) {
8484 ))
8585 }
8686
87- if (length(plot_labels $ dict ) > 0 ) {
88- labels <- lapply(labels , revalue , replace = plot_labels $ dict )
87+ if (length(plot_labels $ dictionary ) > 0 ) {
88+ labels <- lapply(labels , revalue , replace = plot_labels $ dictionary )
8989 }
9090
9191 defaults(plot_labels , labels )
@@ -118,9 +118,10 @@ setup_plot_labels <- function(plot, layers, data) {
118118# ' bottom-right of the plot by default.
119119# ' @param tag The text for the tag label which will be displayed at the
120120# ' top-left of the plot by default.
121- # ' @param dict A named character vector to serve as dictionary. Automatically
122- # ' derived labels, such as those based on variables will be matched with
123- # ' `names(dict)` and replaced by the matching entry in `dict`.
121+ # ' @param dictionary A named character vector to serve as dictionary.
122+ # ' Automatically derived labels, such as those based on variables will
123+ # ' be matched with `names(dictionary)` and replaced by the matching
124+ # ' entry in `dictionary`.
124125# ' @param alt,alt_insight Text used for the generation of alt-text for the plot.
125126# ' See [get_alt_text] for examples. `alt` can also be a function that
126127# ' takes the plot as input and returns text as output. `alt` also accepts
@@ -161,12 +162,12 @@ setup_plot_labels <- function(plot, layers, data) {
161162# ' labs(title = "title") +
162163# ' labs(title = NULL)
163164labs <- function (... , title = waiver(), subtitle = waiver(), caption = waiver(),
164- tag = waiver(), dict = waiver(), alt = waiver(),
165+ tag = waiver(), dictionary = waiver(), alt = waiver(),
165166 alt_insight = waiver()) {
166167 # .ignore_empty = "all" is needed to allow trailing commas, which is NOT a trailing comma for dots_list() as it's in ...
167168 args <- dots_list(... , title = title , subtitle = subtitle , caption = caption ,
168- tag = tag , alt = allow_lambda(alt ), alt_insight = alt_insight , dict = dict ,
169- .ignore_empty = " all" )
169+ tag = tag , alt = allow_lambda(alt ), alt_insight = alt_insight ,
170+ dictionary = dictionary , .ignore_empty = " all" )
170171
171172 is_waive <- vapply(args , is.waive , logical (1 ))
172173 args <- args [! is_waive ]
0 commit comments