diff --git a/R/ppc-distributions.R b/R/ppc-distributions.R index 73b32e34..eb0f0f31 100644 --- a/R/ppc-distributions.R +++ b/R/ppc-distributions.R @@ -647,7 +647,7 @@ ppc_pit_ecdf <- function(y, color = "yrep" ), linetype = 2, show.legend = FALSE) + - labs(y = "ECDF", x = "PIT") + + labs(y = ifelse(plot_diff,"ECDF - difference","ECDF"), x = "PIT") + yaxis_ticks(FALSE) + scale_color_ppc() + bayesplot_theme_get() @@ -735,7 +735,7 @@ ppc_pit_ecdf_grouped <- color = "yrep" ), linetype = 2, show.legend = FALSE) + - labs(y = "ECDF", x = "PIT") + + labs(y = ifelse(plot_diff,"ECDF - difference","ECDF"), x = "PIT") + yaxis_ticks(FALSE) + bayesplot_theme_get() + facet_wrap("group") + diff --git a/tests/testthat/_snaps/ppc-distributions/ppc-pit-ecdf-diff.svg b/tests/testthat/_snaps/ppc-distributions/ppc-pit-ecdf-diff.svg index f5f91cd0..c8888419 100644 --- a/tests/testthat/_snaps/ppc-distributions/ppc-pit-ecdf-diff.svg +++ b/tests/testthat/_snaps/ppc-distributions/ppc-pit-ecdf-diff.svg @@ -51,7 +51,7 @@ 0.75 1.00 PIT -ECDF +ECDF - difference ppc_pit_ecdf (diff) diff --git a/tests/testthat/_snaps/ppc-distributions/ppc-pit-ecdf-grouped-diff.svg b/tests/testthat/_snaps/ppc-distributions/ppc-pit-ecdf-grouped-diff.svg index b3329c23..a62e2778 100644 --- a/tests/testthat/_snaps/ppc-distributions/ppc-pit-ecdf-grouped-diff.svg +++ b/tests/testthat/_snaps/ppc-distributions/ppc-pit-ecdf-grouped-diff.svg @@ -151,7 +151,7 @@ PIT -ECDF +ECDF - difference ppc_pit_ecdf_grouped (diff)