% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/api-methods.R
\name{plot.mfrm_bundle}
\alias{plot.mfrm_bundle}
\title{Plot report/table bundles with base R defaults}
\usage{
\method{plot}{mfrm_bundle}(x, y = NULL, type = NULL, ...)
}
\arguments{
\item{x}{A bundle object returned by mfrmr table/report helpers.}

\item{y}{Reserved for generic compatibility.}

\item{type}{Optional plot type. Available values depend on bundle class.}

\item{...}{Additional arguments forwarded to class-specific plotters.}
}
\value{
A plotting-data object of class \code{mfrm_plot_data}.
}
\description{
Plot report/table bundles with base R defaults
}
\details{
\code{plot()} dispatches by bundle class:
\itemize{
\item \code{mfrm_unexpected} -> \code{\link[=plot_unexpected]{plot_unexpected()}}
\item \code{mfrm_fair_average} -> \code{\link[=plot_fair_average]{plot_fair_average()}}
\item \code{mfrm_displacement} -> \code{\link[=plot_displacement]{plot_displacement()}}
\item \code{mfrm_interrater} -> \code{\link[=plot_interrater_agreement]{plot_interrater_agreement()}}
\item \code{mfrm_facets_chisq} -> \code{\link[=plot_facets_chisq]{plot_facets_chisq()}}
\item \code{mfrm_bias_interaction} -> \code{\link[=plot_bias_interaction]{plot_bias_interaction()}}
\item \code{mfrm_bias_count} -> bias-count plots (cell counts / low-count rates)
\item \code{mfrm_fixed_reports} -> pairwise-contrast diagnostics
\item \code{mfrm_visual_summaries} -> warning/summary message count plots
\item \code{mfrm_category_structure} -> default base-R category plots
\item \code{mfrm_category_curves} -> overview (default), ogive, CCC / category
probability / conditional probability, cumulative, total-information, and
category-specific-information plots
\item \code{mfrm_rating_scale} -> category-counts/threshold plots
\item \code{mfrm_measurable} -> measurable-data coverage/count plots
\item \code{mfrm_unexpected_after_bias} -> post-bias unexpected-response plots
\item \code{mfrm_output_bundle} -> graph/score output-file diagnostics,
including \code{type = "score_se"} when scorefile SE columns are available
\item \code{mfrm_residual_pca} -> residual PCA scree, parallel-analysis, or
loadings views via \code{\link[=plot_residual_pca]{plot_residual_pca()}}
\item \code{mfrm_specifications} -> facet/anchor/convergence plots
\item \code{mfrm_data_quality} -> dashboard, quality-flag, score-map, facet-pattern,
and row/category/missing-row plots
\item \code{mfrm_facets_fit_review} -> FACETS-style df-sensitivity plot
\item \code{mfrm_fit_measures} -> fit-status counts, Infit/Outfit scatter, measure
intervals, and FACETS-style df-sensitivity plots
\item \code{mfrm_iteration_report} -> replayed-iteration trajectories
\item \code{mfrm_subset_connectivity} -> subset-observation/connectivity plots
\item \code{mfrm_facet_statistics} -> facet statistic profile plots
\item \code{mfrm_export_bundle} / \code{mfrm_summary_appendix_export} -> export handoff
plots (\code{formats}, \code{artifact_groups}, \code{selection_tables},
\code{selection_handoff}, \code{selection_handoff_bundles},
\code{selection_handoff_roles},
\code{selection_handoff_role_sections}, \code{selection_bundles},
\code{selection_roles}, \code{selection_sections})
}

If a class is outside these families, use dedicated plotting helpers
or custom base R graphics on component tables.

For \code{mfrm_category_curves}, pass \code{preset = "monochrome"} for
grayscale/line-type output. Cumulative \code{.5} boundary lines are shown
only for interpretable in-range boundaries by default; use
\code{boundary_status = "all"} to show every finite boundary estimate or
\code{boundary_status = "none"} / \code{show_cumulative_boundaries = FALSE} to
suppress those vertical boundary lines. Use
\code{plot_data(x, component = "plot_long")} on a category-curve bundle when
you want one ggplot2/plotly-friendly table across all curve families.
}
\section{Interpreting output}{

The returned object is plotting data (\code{mfrm_plot_data}) that captures
the selected route and reusable data; set \code{draw = TRUE} for immediate base graphics.
}

\section{Typical workflow}{

\enumerate{
\item Create bundle output (e.g., \code{unexpected_response_table()}).
\item Inspect routing with \code{summary(bundle)} if needed.
\item Call \code{plot(bundle, type = ..., draw = FALSE)} to obtain reusable plot data.
}
}

\examples{
\donttest{
toy_full <- load_mfrmr_data("example_core")
toy_people <- unique(toy_full$Person)[1:12]
toy <- toy_full[toy_full$Person \%in\% toy_people, , drop = FALSE]
fit <- suppressWarnings(
  fit_mfrm(toy, "Person", c("Rater", "Criterion"), "Score", method = "JML", maxit = 30)
)
t4 <- unexpected_response_table(fit, abs_z_min = 1.5, prob_max = 0.4, top_n = 5)
p <- plot(t4, draw = FALSE)
vis <- build_visual_summaries(fit, diagnose_mfrm(fit, residual_pca = "none"))
p_vis <- plot(vis, type = "comparison", draw = FALSE)
spec <- specifications_report(fit)
p_spec <- plot(spec, type = "facet_elements", draw = FALSE)
if (interactive()) {
  plot(
    t4,
    type = "severity",
    draw = TRUE,
    main = "Unexpected Response Severity (Customized)",
    palette = c(higher = "#d95f02", lower = "#1b9e77", bar = "#2b8cbe"),
    label_angle = 45
  )
  plot(
    vis,
    type = "comparison",
    draw = TRUE,
    main = "Warning vs Summary Counts (Customized)",
    palette = c(warning = "#cb181d", summary = "#3182bd"),
    label_angle = 45
  )
}
}
}
\seealso{
\code{summary()}, \code{\link[=plot_unexpected]{plot_unexpected()}}, \code{\link[=plot_fair_average]{plot_fair_average()}}, \code{\link[=plot_displacement]{plot_displacement()}}
}
