% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plots.R
\name{plot_subgroup_sizes}
\alias{plot_subgroup_sizes}
\title{Plot the Availability Subgroup Sizes of an IMR Fit}
\usage{
plot_subgroup_sizes(
  object,
  base_cex = 1,
  cex_axis = NULL,
  cex_lab = NULL,
  cex_main = NULL,
  cex_values = NULL,
  col = NULL,
  palette = "subgroup",
  show_values = TRUE,
  ylim = NULL,
  mar = NULL,
  mgp = NULL,
  ...
)
}
\arguments{
\item{object}{A fitted object of class `"imr"` returned by [imr()].}

\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{cex_values}{Bar-value label size multiplier. If `NULL`, a plot-specific
default derived from `base_cex` is used.}

\item{col}{Optional bar colours. If `NULL`, colours are generated from
`palette`.}

\item{palette}{Palette name used when `col = NULL`; `"subgroup"` gives the
package's standard neutral grey-blue subgroup colours (default).}

\item{show_values}{Logical; should sample sizes be printed above the bars
(default `TRUE`)?}

\item{ylim}{Optional numeric vector of length two giving the vertical axis
limits. If `NULL`, limits are chosen from the subgroup sizes.}

\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 [graphics::barplot()].}
}
\value{
Invisibly, the named integer vector of subgroup sizes.
}
\description{
Draws a bar chart of the number of subjects in each modelled
availability subgroup (the non-empty regions of the Venn diagram), giving a
quick picture of how the sample is distributed across subgroups.
}
\examples{
\donttest{
data("simIMR", package = "IntegMultiReg")
fit <- imr(
  platform_data_list = simIMR$platforms, outcome = simIMR$outcome,
  cov = simIMR$covariates, type_outcome = "binary",
  nu = c(-4, -3, -4), sample_mcmc = c(200, 100), ssize = 5, seed = 1
)
plot_subgroup_sizes(fit)
}
}
\seealso{
[imr()], [plot.imr()], [plot_top_features()]
}
