Skip to content

Commit 05e7163

Browse files
committed
cleanup old code
1 parent 8120f5e commit 05e7163

File tree

1 file changed

+0
-21
lines changed

1 file changed

+0
-21
lines changed

R/plot.TPreg.R

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -55,27 +55,6 @@ plot.TPreg <-
5555
autoplot.TPreg(object = x, ...)
5656
}
5757

58-
plot_TPregs <- function(TPregs_tidy, s = NULL) {
59-
my_aes <- list(
60-
color = ggplot2::sym("covar.val"),
61-
fill = ggplot2::sym("covar.val")
62-
)
63-
if ("model.name" %in% colnames(TPregs_tidy)) {
64-
my_aes[["linetype"]] <- ggplot2::sym("model.name")
65-
}
66-
my_aes <- ggpubr::create_aes(my_aes)
67-
ggplot_obj <- ggplot2::ggplot(data = TPregs_tidy, mapping = my_aes) +
68-
ggplot2::geom_ribbon(
69-
ggplot2::aes(x = t, ymin = LWL, ymax = UPL),
70-
alpha = 0.2, size = 0
71-
) +
72-
ggplot2::geom_line(ggplot2::aes(x = t, y = coefficients)) +
73-
ggplot2::geom_hline(yintercept = 0, color = "red") +
74-
ggplot2::geom_vline(xintercept = s) +
75-
ggplot2::facet_wrap(~covar)
76-
return(ggplot_obj)
77-
}
78-
# 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
7958

8059
geom_lineci <- function(mapping = NULL, data = NULL,
8160
position = "identity",

0 commit comments

Comments
 (0)