9696# ' posterior predictive draws may not be shown by default because of the
9797# ' controlled extrapolation. To display all posterior predictive draws, set
9898# ' `extrapolation_factor = Inf`.
99- # '
10099ppc_km_overlay <- function (
101100 y ,
102101 yrep ,
@@ -173,7 +172,7 @@ ppc_km_overlay <- function(
173172 }
174173
175174 fsf $ is_y_color <- as.factor(sub(" \\ [rep\\ ] \\ (.*$" , " rep" , sub(" ^italic\\ (y\\ )" , " y" , fsf $ strata )))
176- fsf $ is_y_size <- ifelse(fsf $ is_y_color == " yrep" , size , 1 )
175+ fsf $ is_y_linewidth <- ifelse(fsf $ is_y_color == " yrep" , size , 1 )
177176 fsf $ is_y_alpha <- ifelse(fsf $ is_y_color == " yrep" , alpha , 1 )
178177
179178 max_time_y <- max(y , na.rm = TRUE )
@@ -189,7 +188,7 @@ ppc_km_overlay <- function(
189188 y = .data $ surv ,
190189 color = .data $ is_y_color ,
191190 group = .data $ strata ,
192- size = .data $ is_y_size ,
191+ linewidth = .data $ is_y_linewidth ,
193192 alpha = .data $ is_y_alpha )) +
194193 geom_step() +
195194 hline_at(
@@ -204,7 +203,7 @@ ppc_km_overlay <- function(
204203 linetype = 2 ,
205204 color = get_color(" dh" )
206205 ) +
207- scale_size_identity () +
206+ scale_linewidth_identity () +
208207 scale_alpha_identity() +
209208 scale_color_ppc() +
210209 scale_y_continuous(breaks = c(0 , 0.5 , 1 )) +
0 commit comments