% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot.R
\name{plot_mdu}
\alias{plot_mdu}
\title{Plot Multidimensional Unfolding Configuration}
\usage{
plot_mdu(
  delta,
  theta = NULL,
  item_alpha = NULL,
  phi = NULL,
  dims = c(1, 2),
  radius = NULL,
  signs = c(1, 1),
  item_labels = NULL,
  show_phi = TRUE,
  show_density = TRUE,
  circle_scale = 1,
  alpha = 0.2,
  contour_n = 60,
  distance = c("auto", "squared", "euclidean"),
  point_estimate = c("EAP", "MAP", "mean", "marginal_map", "joint_map"),
  main = "MDU Configuration",
  xlab = NULL,
  ylab = NULL,
  ...
)
}
\arguments{
\item{delta}{Item coordinate matrix (M items x D dimensions), or a fitted
object with an `EAP()` method.}

\item{theta}{Person coordinate matrix (N persons x D dimensions). If `delta`
is a fitted object and `theta` is `NULL`, it is extracted from the fit.}

\item{item_alpha}{Optional item alpha vector used for item radii. If `delta`
is a fitted object and `item_alpha` is `NULL`, `alpha` is extracted when
available.}

\item{phi}{Deprecated alias for `item_alpha`.}

\item{dims}{Integer vector of length 2 specifying dimensions to plot.}

\item{radius}{Numeric plot radius. If `NULL`, a radius is chosen from the
coordinates.}

\item{signs}{Numeric vector of length 2. Use `-1` to flip an axis.}

\item{item_labels}{Optional item labels. Defaults to row names or item
numbers.}

\item{show_phi}{Logical; whether to draw circles based on item alpha.}

\item{show_density}{Logical; whether to draw density contours for `theta`.}

\item{circle_scale}{Numeric multiplier for item radii.}

\item{alpha}{Circle transparency.}

\item{contour_n}{Grid size passed to `MASS::kde2d()`.}

\item{distance}{Character; `"auto"`, `"squared"`, or `"euclidean"`. Used
to transform item alpha values into plotted radii. `"auto"` uses the fit's
stored distance when available.}

\item{point_estimate}{Character; point estimate used when `delta` is a fit
object. Passed to `estimate()`.}

\item{main, xlab, ylab}{Plot title and axis labels.}

\item{...}{Additional arguments passed to `plot()`.}
}
\value{
Invisibly returns a list with plotted `delta`, `theta`, and
  `item_alpha`.
}
\description{
Draws an item-person map for multidimensional unfolding models. Item
locations are shown as labels, optional blue circles show item alpha/radius
values, and the respondent locations are summarized by a two-
dimensional kernel density contour.
}
