Skip to content

Commit

Permalink
Merge pull request #54 from certara/plot_default_ylab
Browse files Browse the repository at this point in the history
Default ylab plot text given vpc type
  • Loading branch information
certara-jcraig authored Sep 26, 2023
2 parents c2e43a1 + 8ddcec2 commit 4d1cdb5
Show file tree
Hide file tree
Showing 7 changed files with 547 additions and 541 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
1,038 changes: 519 additions & 519 deletions tests/testthat/_snaps/plot/bins-without-stats.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 6 additions & 6 deletions tests/testthat/_snaps/plot/censored-plot-with-aql.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 6 additions & 6 deletions tests/testthat/_snaps/plot/censored-plot-with-bql-aql.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 6 additions & 6 deletions tests/testthat/_snaps/plot/censored-plot-with-bql.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 4d1cdb5

Please sign in to comment.