Skip to content
Open
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
10 changes: 8 additions & 2 deletions R/geom-abline-hline-vline.R
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,10 @@ geom_hline <- function(mapping = NULL, data = NULL,
yintercept,
na.rm = FALSE,
show.legend = NA,
inherit.aes = FALSE) {
inherit.aes = NULL) {

# if NJLL default is based on if xintercept is missing
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# if NJLL default is based on if xintercept is missing
# if NULL, default is based on whether xintercept is missing

(And same below).

inherit.aes <- inherit.aes %||% missing(yintercept)

# Act like an annotation
if (!missing(yintercept)) {
Expand Down Expand Up @@ -169,7 +172,10 @@ geom_vline <- function(mapping = NULL, data = NULL,
xintercept,
na.rm = FALSE,
show.legend = NA,
inherit.aes = FALSE) {
inherit.aes = NULL) {

# if NJLL default is based on if xintercept is missing
inherit.aes <- inherit.aes %||% missing(xintercept)

# Act like an annotation
if (!missing(xintercept)) {
Expand Down
Loading