Skip to content

Commit

Permalink
plot.brmshypothesis: don't show legend unless necessary
Browse files Browse the repository at this point in the history
  • Loading branch information
paul-buerkner committed Dec 18, 2023
1 parent e496ca1 commit 6377885
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions R/hypothesis.R
Original file line number Diff line number Diff line change
Expand Up @@ -538,6 +538,9 @@ plot.brmshypothesis <- function(x, N = 5, ignore_prior = FALSE,
}

.plot_fun <- function(samples) {
samples <- na.omit(samples)
# if no prior draws are present, there is no need to plot a legend
ignore_prior <- ignore_prior || length(unique(samples$Type)) == 1L
gg <- ggplot(samples, aes(x = .data[["values"]])) +
facet_wrap("ind", ncol = 1, scales = "free") +
xlab("") + ylab("") + theme +
Expand Down

0 comments on commit 6377885

Please sign in to comment.