Skip to content

Commit

Permalink
Filter prior density layer to include only shown parameters.
Browse files Browse the repository at this point in the history
  • Loading branch information
bwiernik committed Jul 7, 2023
1 parent 24436e9 commit 3c7ad13
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions R/plot.estimate_density.R
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,9 @@ plot.see_estimate_density <- function(x,
n_columns <- NULL
}

# get parameter names for filtering
params <- unique(x$y)

# get labels
labels <- .clean_parameter_names(x$Parameter, grid = !is.null(n_columns))

Expand All @@ -152,6 +155,7 @@ plot.see_estimate_density <- function(x,
p <- p +
.add_prior_layer_ridgeline(
model,
parameter = params,
show_intercept = show_intercept,
priors_alpha = priors_alpha,
show_ridge_line = FALSE
Expand Down
4 changes: 4 additions & 0 deletions R/plot.p_direction.R
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,9 @@ plot.see_p_direction <- function(x,
n_columns <- NULL
}

# get parameter names for filtering
params <- unique(x$y)

# get labels
labels <- .clean_parameter_names(x$y, grid = !is.null(n_columns))

Expand All @@ -203,6 +206,7 @@ plot.see_p_direction <- function(x,
if (priors) {
p <- p + .add_prior_layer_ridgeline(
model,
parameter = params,
show_intercept = show_intercept,
priors_alpha = priors_alpha
)
Expand Down
4 changes: 4 additions & 0 deletions R/plot.p_significance.R
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,9 @@ plot.see_p_significance <- function(x,
n_columns <- NULL
}

# get parameter names for filtering
params <- unique(x$y)

# get labels
labels <- .clean_parameter_names(x$y, grid = !is.null(n_columns))

Expand All @@ -216,6 +219,7 @@ plot.see_p_significance <- function(x,
p <- p +
.add_prior_layer_ridgeline(
model,
parameter = params,
show_intercept = show_intercept,
priors_alpha = priors_alpha
) +
Expand Down

0 comments on commit 3c7ad13

Please sign in to comment.