Skip to content

Commit a546897

Browse files
committed
code review comments
1 parent 3415f40 commit a546897

File tree

4 files changed

+4
-6
lines changed

4 files changed

+4
-6
lines changed

NEWS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* Fixed regression where `draw_key_rect()` stopped using `fill` colours
66
(@mitchelloharawild, #6609).
77

8-
### Improvements
8+
99
* Allow `stat` in `geom_hline`, `geom_vline`, and `geom_abline`. (@sierrajohnson, #6559)
1010

1111
# ggplot2 4.0.0

R/geom-abline.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,12 @@ NULL
6969
#' geom_hline(aes(yintercept = wt, colour = wt), mean_wt) +
7070
#' facet_wrap(~ cyl)
7171
geom_abline <- function(mapping = NULL, data = NULL,
72+
stat = "identity",
7273
...,
7374
slope,
7475
intercept,
7576
na.rm = FALSE,
7677
show.legend = NA,
77-
stat = "identity",
7878
inherit.aes = FALSE) {
7979

8080
# If nothing set, default to y = x

R/geom-hline.R

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,11 @@ NULL
44
#' @export
55
#' @rdname geom_abline
66
geom_hline <- function(mapping = NULL, data = NULL,
7-
position = "identity",
7+
stat = "identity", position = "identity",
88
...,
99
yintercept,
1010
na.rm = FALSE,
1111
show.legend = NA,
12-
stat = "identity",
1312
inherit.aes = FALSE) {
1413

1514
# Act like an annotation

R/geom-vline.R

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,11 @@ NULL
44
#' @export
55
#' @rdname geom_abline
66
geom_vline <- function(mapping = NULL, data = NULL,
7-
position = "identity",
7+
stat = "identity", position = "identity",
88
...,
99
xintercept,
1010
na.rm = FALSE,
1111
show.legend = NA,
12-
stat = "identity",
1312
inherit.aes = FALSE) {
1413

1514
# Act like an annotation

0 commit comments

Comments
 (0)