Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
strengejacke committed Nov 1, 2022
1 parent f796f5a commit 0d305c5
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions R/plot.performance_pp_check.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)))
Expand Down Expand Up @@ -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) +
Expand All @@ -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(
Expand Down

0 comments on commit 0d305c5

Please sign in to comment.