% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot_pci_grid.R
\name{plot.pci_grid}
\alias{plot.pci_grid}
\title{Plot a Process Capability Sensitivity Grid}
\usage{
\method{plot}{pci_grid}(x, x_axis = c("sigma", "s", "p0"), facet_by = "alpha", ...)
}
\arguments{
\item{x}{A \code{\link{pci_grid}} object.}

\item{x_axis}{Character: which sweep variable to place on the x-axis.
One of \code{"sigma"}, \code{"s"}, or \code{"p0"}.}

\item{facet_by}{Character: column name to facet by. Default \code{"alpha"}.}

\item{...}{Additional arguments (currently ignored).}
}
\value{
Invisibly returns a \code{\link[ggplot2]{ggplot}} object representing
  the sensitivity plot. Called primarily for its side effect of rendering a
  line-and-ribbon plot to the active graphic device.
}
\description{
Produces a \pkg{ggplot2} line-and-ribbon plot showing the PCI estimate
and confidence bands as a function of the chosen sweep variable, faceted
by significance level.
}
\examples{
\donttest{
if (requireNamespace("ggplot2", quietly = TRUE)) {
  grid <- pci_grid("Cp", LSL = 57, USL = 63,
                   sigma_vals = seq(0.5, 2, 0.1), mu = 60,
                   alpha_vals = c(0.05, 0.01),
                   n = 30, B = 200,
                   dist = pci_dist_normal(60, 1))
  plot(grid, x_axis = "sigma")
}
}

}
\seealso{
\code{\link{pci_grid}}
}
