How do I plot one graph with lines that is ecdf_Q2<- 50,40,30,20, and 10 instead of just 50?? thank you!
ecdf_Q2 <- 50 %>%
ecdf.shift(ratio_threshold, .) %>%
filter(nobs > 20) %>%
ggplot(aes( x = OUR_ratio_cutoff, y = prob)) +
geom_rect(aes(xmin = 1.05, xmax = Inf, ymin = -Inf, ymax = Inf), fill = "red", alpha = 0.01) +
geom_line() +
geom_point() +
theme_bw(base_size = 12) +
theme(panel.grid = element_blank()) +
scale_y_continuous(limits = c(0,100),
breaks = seq(0,300, by = 10),
expand = c(0,0)) +
scale_x_continuous(limits = c(0,2),
breaks = seq(0,3, by = 0.1),
expand = c(0,0)) +
labs(x = "OUR ratio (-)",
y = "Probability of PE sCOD > 50")
top <- plot_grid(TSS_con_boxplot, TSS_con_hi, ecdf_Q2, ncol = 3, rel_widths = c(0.33, 1,1), align = "hv")
###########################################################################