From 9c945507a2ee0532454cd34fb2573cfc28ce8505 Mon Sep 17 00:00:00 2001 From: Teun van den Brand <49372158+teunbrand@users.noreply.github.com> Date: Wed, 30 Nov 2022 22:35:16 +0100 Subject: [PATCH 1/2] Fix #5053 --- R/stat-smooth.r | 2 ++ 1 file changed, 2 insertions(+) diff --git a/R/stat-smooth.r b/R/stat-smooth.r index aad4dccf91..a6366f08ee 100644 --- a/R/stat-smooth.r +++ b/R/stat-smooth.r @@ -182,5 +182,7 @@ StatSmooth <- ggproto("StatSmooth", Stat, flip_data(prediction, flipped_aes) }, + dropped_aes = c("weight"), + required_aes = c("x", "y") ) From 3d89fb0a3f67a88a94b679c60538798a76f1dffb Mon Sep 17 00:00:00 2001 From: Teun van den Brand <49372158+teunbrand@users.noreply.github.com> Date: Thu, 1 Dec 2022 07:57:31 +0100 Subject: [PATCH 2/2] Add NEWS bullet --- NEWS.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/NEWS.md b/NEWS.md index 582d9f2794..72e39a284d 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,8 @@ # ggplot2 (development version) +* Fixed spurious warning when `weight` aesthetic was used in `stat_smooth()` + (@teunbrand based on @clauswilke's suggestion, #5053). + # ggplot2 3.4.0 This is a minor release focusing on tightening up the internals and ironing out some inconsistencies in the API. The biggest change is the addition of the