diff --git a/R/jskm.R b/R/jskm.R index 6e009b9..432ef84 100644 --- a/R/jskm.R +++ b/R/jskm.R @@ -730,7 +730,7 @@ jskm <- function(sfit, p2 <- p1 + coord_cartesian(ylim = nejm.infigure.ylim) + theme( axis.title.x = element_blank(), axis.title.y = element_blank(), axis.text = element_text(size = 10 * nejm.infigure.ratiow), - ) + guides(colour = "none", linetype = "none") + ) + guides(colour = "none", linetype = "none") + scale_y_continuous(limits = nejm.infigure.ylim, breaks = waiver(), labels = scale_labels) p <- p + patchwork::inset_element(p2, 1 - nejm.infigure.ratiow, 1 - nejm.infigure.ratioh, 1, 1, align_to = "panel") } diff --git a/R/svyjskm.R b/R/svyjskm.R index 6ac5962..3865883 100644 --- a/R/svyjskm.R +++ b/R/svyjskm.R @@ -689,7 +689,7 @@ svyjskm <- function(sfit, if (!is.null(theme) && theme == "nejm") { p2 <- p1 + coord_cartesian(ylim = nejm.infigure.ylim) + theme( axis.title.x = element_blank(), axis.title.y = element_blank(), - axis.text = element_text(size = 10 * nejm.infigure.ratiow) + axis.text = element_text(size = 10 * nejm.infigure.ratiow) + scale_y_continuous(limits = nejm.infigure.ylim, breaks = waiver(), labels = scale_labels) ) + guides(colour = "none", linetype = "none") p <- p + patchwork::inset_element(p2, 1 - nejm.infigure.ratiow, 1 - nejm.infigure.ratioh, 1, 1, align_to = "panel") }