Skip to content

Commit e4fc12d

Browse files
authored
Silence additional weight warnings (#5267)
* Expose `geom_dotplot()`'s 'weight' aesthetic * `stat_ydensity()` drops weight
1 parent ca9fd2e commit e4fc12d

File tree

4 files changed

+8
-3
lines changed

4 files changed

+8
-3
lines changed

R/geom-dotplot.R

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,8 @@ GeomDotplot <- ggproto("GeomDotplot", Geom,
188188
required_aes = c("x", "y"),
189189
non_missing_aes = c("size", "shape"),
190190

191-
default_aes = aes(colour = "black", fill = "black", alpha = NA, stroke = 1, linetype = "solid"),
191+
default_aes = aes(colour = "black", fill = "black", alpha = NA,
192+
stroke = 1, linetype = "solid", weight = 1),
192193

193194
setup_data = function(data, params) {
194195
data$width <- data$width %||%

R/stat-bindot.R

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,9 @@ StatBindot <- ggproto("StatBindot", Stat,
124124
data$x <- midline
125125
}
126126
return(data)
127-
}
127+
},
128+
129+
dropped_aes = "weight"
128130
)
129131

130132

R/stat-ydensity.R

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,9 @@ StatYdensity <- ggproto("StatYdensity", Stat,
138138
)
139139
data$flipped_aes <- flipped_aes
140140
flip_data(data, flipped_aes)
141-
}
141+
},
142142

143+
dropped_aes = "weight"
143144
)
144145

145146
calc_bw <- function(x, bw) {

man/geom_dotplot.Rd

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)