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", diff --git a/tests/testthat/_snaps/plot/bins-without-stats.svg b/tests/testthat/_snaps/plot/bins-without-stats.svg index 2a49aa1..48bf0e1 100644 --- a/tests/testthat/_snaps/plot/bins-without-stats.svg +++ b/tests/testthat/_snaps/plot/bins-without-stats.svg @@ -21,528 +21,528 @@ - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0 -50 -100 -150 -200 -250 - - - - - - - - - - -0 -5 -10 -15 -TIME -Bins without stats +0 +50 +100 +150 +200 +250 + + + + + + + + + + +0 +5 +10 +15 +TIME +Bins without stats diff --git a/tests/testthat/_snaps/plot/censored-plot-with-aql.svg b/tests/testthat/_snaps/plot/censored-plot-with-aql.svg index a358ba8..8a75992 100644 --- a/tests/testthat/_snaps/plot/censored-plot-with-aql.svg +++ b/tests/testthat/_snaps/plot/censored-plot-with-aql.svg @@ -57,16 +57,16 @@ -Observed/Simulated probabilities and associated 95% CI +Percentiles and associated 95% CI - - + + - + @@ -1062,11 +1062,11 @@ -Observed/Simulated probabilities and associated 95% CI +Percentiles and associated 95% CI - + diff --git a/tests/testthat/_snaps/plot/censored-plot-with-bql-aql.svg b/tests/testthat/_snaps/plot/censored-plot-with-bql-aql.svg index 5a23a25..caea95d 100644 --- a/tests/testthat/_snaps/plot/censored-plot-with-bql-aql.svg +++ b/tests/testthat/_snaps/plot/censored-plot-with-bql-aql.svg @@ -66,16 +66,16 @@ -Observed/Simulated probabilities and associated 95% CI +Percentiles and associated 95% CI - - + + - + @@ -1394,11 +1394,11 @@ -Observed/Simulated probabilities and associated 95% CI +Percentiles and associated 95% CI - + diff --git a/tests/testthat/_snaps/plot/censored-plot-with-bql.svg b/tests/testthat/_snaps/plot/censored-plot-with-bql.svg index 8a2db2d..bd971de 100644 --- a/tests/testthat/_snaps/plot/censored-plot-with-bql.svg +++ b/tests/testthat/_snaps/plot/censored-plot-with-bql.svg @@ -57,16 +57,16 @@ -Observed/Simulated probabilities and associated 95% CI +Percentiles and associated 95% CI - - + + - + @@ -1069,11 +1069,11 @@ -Observed/Simulated probabilities and associated 95% CI +Percentiles and associated 95% CI - + diff --git a/tests/testthat/_snaps/plot/one-sided-strat-formula-with-facet-wrap.svg b/tests/testthat/_snaps/plot/one-sided-strat-formula-with-facet-wrap.svg index 06b43d9..e256863 100644 --- a/tests/testthat/_snaps/plot/one-sided-strat-formula-with-facet-wrap.svg +++ b/tests/testthat/_snaps/plot/one-sided-strat-formula-with-facet-wrap.svg @@ -858,7 +858,7 @@ TIME -Observed/Simulated probabilities and associated 95% CI +Percentiles and associated 95% CI Observed Percentiles (black lines) diff --git a/tests/testthat/_snaps/plot/two-sided-strat-formula-with-facet-grid.svg b/tests/testthat/_snaps/plot/two-sided-strat-formula-with-facet-grid.svg index 026a9ed..a8921fd 100644 --- a/tests/testthat/_snaps/plot/two-sided-strat-formula-with-facet-grid.svg +++ b/tests/testthat/_snaps/plot/two-sided-strat-formula-with-facet-grid.svg @@ -862,7 +862,7 @@ TIME -Observed/Simulated probabilities and associated 95% CI +Percentiles and associated 95% CI Observed Percentiles (black lines)