% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/methods.R, R/wrappers.R
\name{plot.imr}
\alias{plot.imr}
\alias{plot_imr}
\title{Plot Method for IMR Fits}
\usage{
\method{plot}{imr}(
  x,
  type = c("selection", "theta", "trace"),
  platform = NULL,
  base_cex = 1,
  cex_axis = NULL,
  cex_lab = NULL,
  cex_main = NULL,
  col = NULL,
  palette = NULL,
  legend = TRUE,
  legend_width = 0.28,
  mar = NULL,
  mgp = NULL,
  ...
)

plot_imr(x, ...)
}
\arguments{
\item{x}{A fitted object of class `"imr"`.}

\item{type}{Character; one of `"selection"` (default), `"theta"` or
`"trace"`.}

\item{platform}{Optional integer vector selecting which platforms to display
for the `"selection"` and `"theta"` plots; defaults to all platforms.}

\item{base_cex}{Overall text-size multiplier. The `cex_*` arguments default
to values derived from this multiplier (default `1`).}

\item{cex_axis}{Axis-label size multiplier. If `NULL`, a plot-specific
default derived from `base_cex` is used.}

\item{cex_lab}{Axis-title size multiplier. If `NULL`, a plot-specific
default derived from `base_cex` is used.}

\item{cex_main}{Main-title size multiplier. If `NULL`, a plot-specific
default derived from `base_cex` is used.}

\item{col}{Optional colours. For heatmaps this is the colour scale; for
trace plots this is the line colour.}

\item{palette}{Optional heatmap palette name used when `col = NULL`.
Selection plots default to `"grey"` to preserve the mPIP intensity scale;
theta plots default to the muted grey-blue `"heatmap"` palette.}

\item{legend}{Logical; for `"selection"` plots, should the mPIP intensity
legend be drawn (default `TRUE`)?}

\item{legend_width}{Relative width of the intensity-legend panel for
`"selection"` plots (default `0.28`).}

\item{mar, mgp}{Optional graphical margin and axis-title placement vectors
passed to [graphics::par()] for finer layout control.}

\item{...}{Further graphical parameters passed to the underlying plotting
functions.}
}
\value{
`NULL`, invisibly; called for the side effect of producing a plot.
}
\description{
Visualizes a fitted `"imr"` object.  Three plot types are available:
\describe{
  \item{`"selection"`}{Heatmap of the marginal posterior inclusion
    probabilities (mPIP), one panel per platform, with features on the
    horizontal axis, availability subgroups on the vertical axis and a small
    intensity legend showing that darker values are closer to 1.}
  \item{`"theta"`}{Heatmap of the posterior mean MRF interaction parameters
    between availability subgroups, one panel per platform.}
  \item{`"trace"`}{Trace plot of the log-posterior across MCMC iterations.}
}
See [plot_top_features()] and [plot_subgroup_sizes()] for two further ready
made displays.
}
\seealso{
[imr()], [plot_top_features()], [plot_subgroup_sizes()]
}
