From 27d02eb6e626a445d3c32b0802226dadf607d114 Mon Sep 17 00:00:00 2001 From: annataylor9916 Date: Tue, 3 Dec 2024 16:07:50 +0100 Subject: [PATCH] Update geom_hpline.R --- R/geom_hpline.R | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/R/geom_hpline.R b/R/geom_hpline.R index fdbe71b..ad4abfc 100644 --- a/R/geom_hpline.R +++ b/R/geom_hpline.R @@ -30,8 +30,7 @@ geom_hpline <- function(mapping = NULL, data = NULL, na.rm = FALSE, show.legend = NA, inherit.aes = TRUE) { - layer( - data = data, + layer(data = data, mapping = mapping, stat = stat, geom = GeomHpline, @@ -51,9 +50,9 @@ geom_hpline <- function(mapping = NULL, data = NULL, #' @export GeomHpline <- ggproto("GeomHpline", GeomSegment, required_aes = c("x", "y"), - non_missing_aes = c("size", "colour", "linetype", "width"), + non_missing_aes = c("linewidth", "colour", "linetype", "width"), default_aes = aes( - width = 0.5, colour = "black", size = 2, linetype = 1, + width = 0.5, colour = "black", linewidth = 2, linetype = 1, alpha = NA ),