Skip to content

Commit 7d05fa3

Browse files
waltersomkarawoo
andauthored
Fix labeller to pass .default for lookups (#4031) (#4032)
* Fix labeller to pass .default for lookups (#4031) Pass .default to as_labeller even when margin_labeller is null, such as when using named arguements for a lookup table. * Correct style, and add line to NEWS.md * Move NEWS bullet into dev version section Co-authored-by: Kara Woo <[email protected]>
1 parent b0134b1 commit 7d05fa3

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

NEWS.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# ggplot2 (development version)
22

3+
* Fixed a bug in `labeller()` so that `.default` is passed to `as_labeller()`
4+
when labellers are specified by naming faceting variables. (@waltersom, #4031)
5+
36
# ggplot2 3.3.2
47
This is a small release focusing on fixing regressions introduced in 3.3.1.
58

R/labeller.r

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,7 @@ labeller <- function(..., .rows = NULL, .cols = NULL,
437437
}
438438

439439
if (is.null(margin_labeller)) {
440-
labellers <- lapply(dots, as_labeller)
440+
labellers <- lapply(dots, as_labeller, default = .default)
441441
} else {
442442
margin_labeller <- as_labeller(margin_labeller, default = .default,
443443
multi_line = .multi_line)

0 commit comments

Comments
 (0)