Skip to content

Expose position arg on geom_hline() and geom_vline() #4286

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ name: R-CMD-check

# Increment this version when we want to clear cache
env:
cache-version: v4
cache-version: v5

jobs:
R-CMD-check:
Expand Down
3 changes: 3 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@
* Fix a bug that `after_stat()` and `after_scale()` cannot refer to aesthetics
if it's specified in the plot-global mapping (@yutannihilation, #4260).

* `geom_hline()` and `geom_vline()` now have `position` argument
(@yutannihilation, #4285).

# ggplot2 3.3.3
This is a small patch release mainly intended to address changes in R and CRAN.
It further changes the licensing model of ggplot2 to an MIT license.
Expand Down
3 changes: 2 additions & 1 deletion R/geom-hline.r
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ NULL
#' @export
#' @rdname geom_abline
geom_hline <- function(mapping = NULL, data = NULL,
position = "identity",
...,
yintercept,
na.rm = FALSE,
Expand All @@ -29,7 +30,7 @@ geom_hline <- function(mapping = NULL, data = NULL,
mapping = mapping,
stat = StatIdentity,
geom = GeomHline,
position = PositionIdentity,
position = position,
show.legend = show.legend,
inherit.aes = FALSE,
params = list(
Expand Down
3 changes: 2 additions & 1 deletion R/geom-vline.r
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ NULL
#' @export
#' @rdname geom_abline
geom_vline <- function(mapping = NULL, data = NULL,
position = "identity",
...,
xintercept,
na.rm = FALSE,
Expand All @@ -29,7 +30,7 @@ geom_vline <- function(mapping = NULL, data = NULL,
mapping = mapping,
stat = StatIdentity,
geom = GeomVline,
position = PositionIdentity,
position = position,
show.legend = show.legend,
inherit.aes = FALSE,
params = list(
Expand Down
5 changes: 5 additions & 0 deletions man/geom_abline.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.