From 0d305c55d09904c53c92b1725b9e05856c417657 Mon Sep 17 00:00:00 2001 From: Daniel Date: Tue, 1 Nov 2022 17:42:25 +0100 Subject: [PATCH] fix --- R/plot.performance_pp_check.R | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/R/plot.performance_pp_check.R b/R/plot.performance_pp_check.R index b350044bf..401a39c13 100644 --- a/R/plot.performance_pp_check.R +++ b/R/plot.performance_pp_check.R @@ -24,7 +24,7 @@ data_plot.performance_pp_check <- function(x, ...) { "ylab" = "Density", "title" = "Posterior Predictive Check", "check_range" = attr(x, "check_range"), - "bandwidth" <- attr(x, "bandwidth") + "bandwidth" = attr(x, "bandwidth") ) class(dataplot) <- unique(c("data_plot", "see_performance_pp_check", class(dataplot))) @@ -111,9 +111,9 @@ plot.see_performance_pp_check <- function(x, info <- attr(x, "info") # default bandwidth, for smooting - bandwith <- attr(x, "bandwidth") - if (is.null(bandwith)) { - bandwith <- "nrd" + bandwidth <- info$bandwidth + if (is.null(bandwidth)) { + bandwidth <- "nrd" } out <- ggplot2::ggplot(x) + @@ -127,7 +127,7 @@ plot.see_performance_pp_check <- function(x, ), geom = "line", position = "identity", - bw = bandwith + bw = bandwidth ) + ggplot2::scale_y_continuous() + ggplot2::scale_color_manual(values = c(