Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# ggplot2 (development version)

* Fix bug in `labeller()` where parsing was turned off if `.multiline = FALSE`
(@thomasp85, #4084)

* Fix bug in `geom_dotplot()` where dots would be positioned wrong with
`stackgroups = TRUE` (@thomasp85, #1745)

Expand Down
7 changes: 6 additions & 1 deletion R/labeller.r
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,13 @@
NULL

collapse_labels_lines <- function(labels) {
is_exp <- vapply(labels, function(l) length(l) > 0 && is.expression(l[[1]]), logical(1))
out <- do.call("Map", c(list(paste, sep = ", "), labels))
list(unname(unlist(out)))
label <- list(unname(unlist(out)))
if (all(is_exp)) {
label <- lapply(label, function(l) list(parse(text = paste0("list(", l, ")"))))
}
label
}

#' @rdname labellers
Expand Down