Skip to content

Commit

Permalink
Only print the names of the aesthetics with mismatched length (#2853)
Browse files Browse the repository at this point in the history
* Only print the names of the aesthetics with mismatched length

* Add NEWS.md bullet
  • Loading branch information
karawoo authored Aug 24, 2018
1 parent cac3a95 commit adce4e2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# ggplot2 3.0.0.9000

* The error message in `compute_aesthetics()` now provides the names of only
aesthetics with mismatched lengths, rather than all aesthetics (@karawoo,
#2853).

* `geom_sf()` now respects `lineend`, `linejoin`, and `linemitre` parameters
for lines and polygons (@alistaire47, #2826)

Expand Down
2 changes: 1 addition & 1 deletion R/geom-.r
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ check_aesthetics <- function(x, n) {

stop(
"Aesthetics must be either length 1 or the same as the data (", n, "): ",
paste(names(!good), collapse = ", "),
paste(names(which(!good)), collapse = ", "),
call. = FALSE
)
}

0 comments on commit adce4e2

Please sign in to comment.