Skip to contents

Generates a plot showing the posterior distributions of the inferred breakpoints from a fitted model. The plot can include density estimates and optional histograms for better visualization.

Usage

plot_breakpoints_posterior(x, with_histogram = F, alpha = 0.6, colors = NULL)

Arguments

x

A bipod object that contains a 'breakpoints_fit' field.

with_histogram

A logical value indicating whether to overlay histograms of the breakpoint samples on the density plots. (default is FALSE)

alpha

A numeric value between 0 and 1 specifying the transparency level of the density plot. (default is 0.6)

colors

A character vector specifying colors to use for the different inferred breakpoints. If NULL, the default color 'darkgray' is used for all breakpoints.

Value

A ggplot2 object displaying the posterior distributions of the inferred breakpoints. The plot shows density estimates and optionally histograms for the breakpoints.