From 98e4a70f5578262d80d632ab0cc0436b4d23c49b Mon Sep 17 00:00:00 2001 From: certara-jcraig <61294078+certara-jcraig@users.noreply.github.com> Date: Tue, 26 Sep 2023 07:40:58 -0700 Subject: [PATCH] default ylab plot text given vpc type --- R/plot.R | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/R/plot.R b/R/plot.R index 84667ef..059c3fc 100644 --- a/R/plot.R +++ b/R/plot.R @@ -113,8 +113,14 @@ plot.tidyvpcobj <- function(x, if (is.null(ylab)) { ylab <- - sprintf("Observed/Simulated probabilities and associated %s%% CI", - 100 * vpc$conf.level) + paste0( + ifelse(vpc_type == "continuous", "Percentiles", "Probabilities"), + sprintf(" and associated %s%% CI", + 100 * vpc$conf.level) + ) + if (is.null(vpc$stats)) { + ylab <- NULL + } if (isTRUE(vpc$predcor)) { ylab <- ifelse(length(ylab) == 0, "Prediction Corrected",