Skip to content

Commit

Permalink
cleanup old code
Browse files Browse the repository at this point in the history
  • Loading branch information
qmarcou committed Jul 2, 2024
1 parent 8120f5e commit 05e7163
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions R/plot.TPreg.R
Original file line number Diff line number Diff line change
Expand Up @@ -55,27 +55,6 @@ plot.TPreg <-
autoplot.TPreg(object = x, ...)
}

plot_TPregs <- function(TPregs_tidy, s = NULL) {
my_aes <- list(
color = ggplot2::sym("covar.val"),
fill = ggplot2::sym("covar.val")
)
if ("model.name" %in% colnames(TPregs_tidy)) {
my_aes[["linetype"]] <- ggplot2::sym("model.name")
}
my_aes <- ggpubr::create_aes(my_aes)
ggplot_obj <- ggplot2::ggplot(data = TPregs_tidy, mapping = my_aes) +
ggplot2::geom_ribbon(
ggplot2::aes(x = t, ymin = LWL, ymax = UPL),
alpha = 0.2, size = 0
) +
ggplot2::geom_line(ggplot2::aes(x = t, y = coefficients)) +
ggplot2::geom_hline(yintercept = 0, color = "red") +
ggplot2::geom_vline(xintercept = s) +
ggplot2::facet_wrap(~covar)
return(ggplot_obj)
}
# problem of shared colorscale between faceted plots, cf https://stackoverflow.com/questions/3805029/different-legends-and-fill-colours-for-facetted-ggplot, see bottom answer using ggnewscale

geom_lineci <- function(mapping = NULL, data = NULL,
position = "identity",
Expand Down

0 comments on commit 05e7163

Please sign in to comment.