Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default ylab plot text given vpc type #54

Merged
merged 2 commits into from
Sep 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
Loading