Skip to content

Commit adce4e2

Browse files
authored
Only print the names of the aesthetics with mismatched length (#2853)
* Only print the names of the aesthetics with mismatched length * Add NEWS.md bullet
1 parent cac3a95 commit adce4e2

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

NEWS.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# ggplot2 3.0.0.9000
22

3+
* The error message in `compute_aesthetics()` now provides the names of only
4+
aesthetics with mismatched lengths, rather than all aesthetics (@karawoo,
5+
#2853).
6+
37
* `geom_sf()` now respects `lineend`, `linejoin`, and `linemitre` parameters
48
for lines and polygons (@alistaire47, #2826)
59

R/geom-.r

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ check_aesthetics <- function(x, n) {
184184

185185
stop(
186186
"Aesthetics must be either length 1 or the same as the data (", n, "): ",
187-
paste(names(!good), collapse = ", "),
187+
paste(names(which(!good)), collapse = ", "),
188188
call. = FALSE
189189
)
190190
}

0 commit comments

Comments
 (0)