Skip to content

Commit 8c33474

Browse files
committed
rename boilerplate() to make_constructor()
1 parent e6db72d commit 8c33474

31 files changed

+56
-51
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ Collate:
9898
'annotation-logticks.R'
9999
'scale-type.R'
100100
'layer.R'
101-
'boilerplates.R'
101+
'make-constructor.R'
102102
'geom-polygon.R'
103103
'geom-map.R'
104104
'annotation-map.R'

NAMESPACE

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ S3method(as.data.frame,mapped_discrete)
1616
S3method(as.list,ggproto)
1717
S3method(autolayer,default)
1818
S3method(autoplot,default)
19-
S3method(boilerplate,Geom)
2019
S3method(c,mapped_discrete)
2120
S3method(drawDetails,zeroGrob)
2221
S3method(element_grob,element_blank)
@@ -92,6 +91,7 @@ S3method(limits,character)
9291
S3method(limits,factor)
9392
S3method(limits,numeric)
9493
S3method(makeContext,dotstackGrob)
94+
S3method(make_constructor,Geom)
9595
S3method(merge_element,default)
9696
S3method(merge_element,element)
9797
S3method(merge_element,element_blank)
@@ -298,7 +298,6 @@ export(autolayer)
298298
export(autoplot)
299299
export(benchplot)
300300
export(binned_scale)
301-
export(boilerplate)
302301
export(borders)
303302
export(calc_element)
304303
export(check_device)
@@ -492,6 +491,7 @@ export(layer_grob)
492491
export(layer_scales)
493492
export(layer_sf)
494493
export(lims)
494+
export(make_constructor)
495495
export(map_data)
496496
export(margin)
497497
export(max_height)

R/geom-bar.R

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,4 +136,7 @@ GeomBar <- ggproto("GeomBar", GeomRect,
136136
#' ggplot(df, aes(x, y)) + geom_col(just = 0.5)
137137
#' # Columns begin on the first day of the month
138138
#' ggplot(df, aes(x, y)) + geom_col(just = 1)
139-
geom_bar <- boilerplate(GeomBar, stat = "count", position = "stack", just = 0.5)
139+
geom_bar <- make_constructor(
140+
GeomBar,
141+
stat = "count", position = "stack", just = 0.5
142+
)

R/geom-bin2d.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ NULL
3131
#'
3232
#' # Or by specifying the width of the bins
3333
#' d + geom_bin_2d(binwidth = c(0.1, 0.1))
34-
geom_bin_2d <- boilerplate(GeomTile, stat = "bin2d")
34+
geom_bin_2d <- make_constructor(GeomTile, stat = "bin2d")
3535

3636
#' @export
3737
#' @rdname geom_bin_2d

R/geom-col.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#' @export
22
#' @rdname geom_bar
3-
geom_col <- boilerplate(GeomBar, position = "stack", just = 0.5)
3+
geom_col <- make_constructor(GeomBar, position = "stack", just = 0.5)
44

55
#' @rdname ggplot2-ggproto
66
#' @format NULL

R/geom-contour.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,15 +83,15 @@ GeomContourFilled <- ggproto("GeomContourFilled", GeomPolygon)
8383
#' v + geom_raster(aes(fill = density)) +
8484
#' geom_contour(colour = "white")
8585
#' }
86-
geom_contour <- boilerplate(
86+
geom_contour <- make_constructor(
8787
GeomContour, stat = "contour",
8888
# Passed to contour stat:
8989
bins = NULL, binwidth = NULL, breaks = NULL
9090
)
9191

9292
#' @rdname geom_contour
9393
#' @export
94-
geom_contour_filled <- boilerplate(
94+
geom_contour_filled <- make_constructor(
9595
GeomContourFilled, stat = "contour_filled",
9696
# Passed to contour_filled stat:
9797
bins = NULL, binwidth = NULL, breaks = NULL

R/geom-count.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,4 @@ NULL
4646
#' scale_size_area(max_size = 10)
4747
#' d + geom_count(aes(size = after_stat(prop), group = clarity)) +
4848
#' scale_size_area(max_size = 10)
49-
geom_count <- boilerplate(GeomPoint, stat = "sum")
49+
geom_count <- make_constructor(GeomPoint, stat = "sum")

R/geom-crossbar.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,4 +93,4 @@ GeomCrossbar <- ggproto("GeomCrossbar", Geom,
9393

9494
#' @export
9595
#' @rdname geom_linerange
96-
geom_crossbar <- boilerplate(GeomCrossbar)
96+
geom_crossbar <- make_constructor(GeomCrossbar)

R/geom-curve.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,4 @@ GeomCurve <- ggproto("GeomCurve", GeomSegment,
4747
#' @inheritParams grid::curveGrob
4848
#' @export
4949
#' @rdname geom_segment
50-
geom_curve <- boilerplate(GeomCurve)
50+
geom_curve <- make_constructor(GeomCurve)

R/geom-density.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ GeomDensity <- ggproto(
7272
#' ggplot(diamonds, aes(carat, after_stat(count), fill = cut)) +
7373
#' geom_density(position = "fill")
7474
#' }
75-
geom_density <- boilerplate(
75+
geom_density <- make_constructor(
7676
GeomDensity, stat = "density",
7777
checks = exprs(
7878
outline.type <- arg_match0(outline.type, c("both", "upper", "lower", "full"))

0 commit comments

Comments
 (0)