Skip to content

Commit

Permalink
default ylab plot text given vpc type
Browse files Browse the repository at this point in the history
  • Loading branch information
certara-jcraig committed Sep 26, 2023
1 parent c2e43a1 commit 98e4a70
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions R/plot.R
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 98e4a70

Please sign in to comment.