Helper function to handle optional layers
add_optional_layers(
plt,
yaxis_scale,
show_threshold,
threshold_value,
show_dose,
data,
time_scale,
facet_by = NULL
)The ggplot object to modify
The scale of the y-axis ("Log" or "Linear")
Whether to show a threshold line
The value of the threshold line
Whether to show dose times as vertical lines
The data used for plotting
The time scale used for plotting
Variables to facet the plot by #' @returns The modified ggplot object with optional layers added