Skip to content

Commit 4415ad8

Browse files
committed
better bug fix for inherited aesthetics
1 parent cdaa9a1 commit 4415ad8

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

R/photoperiod.R

+2-4
Original file line numberDiff line numberDiff line change
@@ -583,27 +583,25 @@ gg_photoperiod <- function(ggplot_obj,
583583
photoperiod_geoms <-
584584
list(
585585
ggplot2::geom_rect(
586+
inherit.aes = FALSE,
586587
data = photoperiod_data |> tidyr::drop_na(dawn, midnight.before),
587588
ggplot2::aes(
588589
xmin = midnight.before,
589590
xmax = dawn,
590591
ymin = -Inf,
591592
ymax = Inf,
592-
y = NULL,
593-
x = NULL
594593
),
595594
alpha = alpha,
596595
...
597596
),
598597
ggplot2::geom_rect(
598+
inherit.aes = FALSE,
599599
data = photoperiod_data |> tidyr::drop_na(dusk, midnight.after),
600600
ggplot2::aes(
601601
xmin = dusk,
602602
xmax = midnight.after,
603603
ymin = -Inf,
604604
ymax = Inf,
605-
y = NULL,
606-
x = NULL
607605
),
608606
alpha = alpha,
609607
...

0 commit comments

Comments
 (0)