% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot.ngme.R
\name{posterior_plot}
\alias{posterior_plot}
\alias{plot.ngme_sgld_ci}
\title{Plot Posterior Distributions from SGLD Samples}
\usage{
posterior_plot(
  x,
  parameters = NULL,
  type = c("density", "histogram"),
  by_chain = FALSE,
  show_estimate = TRUE,
  show_interval = TRUE,
  lower = NULL,
  upper = NULL,
  bins = 30,
  ncol = NULL,
  ...
)

\method{plot}{ngme_sgld_ci}(x, ...)
}
\arguments{
\item{x}{a data.frame (or list of data.frames) returned by
[ngme_sgld_samples()], or an object of class `ngme_sgld_ci`.}

\item{parameters}{optional character vector of parameter names to plot.
Defaults to all parameter columns.}

\item{type}{character; `"density"` (default) or `"histogram"`.}

\item{by_chain}{logical; if `TRUE`, color distributions by chain when a
`.chain` column is available.}

\item{show_estimate}{logical; add a vertical line at the posterior mean.}

\item{show_interval}{logical; add vertical lines for the equal-tail interval.}

\item{lower}{lower quantile probability used for intervals. If `x` is an
`ngme_sgld_ci` object, the stored value is used by default.}

\item{upper}{upper quantile probability used for intervals. If `x` is an
`ngme_sgld_ci` object, the stored value is used by default.}

\item{bins}{number of bins for histograms.}

\item{ncol}{number of facet columns. If `NULL`, use 2 columns for multiple
parameters and 1 for a single parameter.}

\item{...}{unused.}
}
\value{
A faceted ggplot object.
}
\description{
Visualize marginal posterior distributions of parameters extracted from
[ngme_sgld_samples()] or summarized by [ngme_sgld_ci()].
}
