Skip to content

Commit 5e8699d

Browse files
Maschettehadley
authored andcommitted
Add ggplot_add.by method (#3425)
Fixes #2734
1 parent 8a88720 commit 5e8699d

File tree

6 files changed

+29
-16
lines changed

6 files changed

+29
-16
lines changed

NAMESPACE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ S3method(ggplot_add,Coord)
4949
S3method(ggplot_add,Facet)
5050
S3method(ggplot_add,Layer)
5151
S3method(ggplot_add,Scale)
52+
S3method(ggplot_add,by)
5253
S3method(ggplot_add,data.frame)
5354
S3method(ggplot_add,default)
5455
S3method(ggplot_add,guides)

NEWS.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# ggplot2 (development version)
22

3+
* Added function `ggplot_add.by()` for lists created with `by()` (#2734, @Maschette)
4+
35
* `ggdep()` was deprecated (@perezp44, #3382).
46

57
* Added weight aesthetic option to `stat_density()` and made scaling of

R/plot-construction.r

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,11 @@ ggplot_add.list <- function(object, plot, object_name) {
151151
}
152152
plot
153153
}
154+
#' @export
155+
ggplot_add.by <- function(object, plot, object_name) {
156+
ggplot_add.list(object, plot, object_name)
157+
}
158+
154159
#' @export
155160
ggplot_add.Layer <- function(object, plot, object_name) {
156161
plot$layers <- append(plot$layers, object)

man/geom_density_2d.Rd

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

man/geom_ribbon.Rd

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

man/lims.Rd

Lines changed: 18 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)