% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/visstat_methods.R
\name{plot.visstat}
\alias{plot.visstat}
\title{Plot method for visstat objects}
\usage{
\method{plot}{visstat}(x, which = NULL, ...)
}
\arguments{
\item{x}{An object of class \code{"visstat"}, returned by
\code{\link{visstat}()}.}

\item{which}{Integer selecting a single plot to display (1, 2, ...).
If \code{NULL} (the default), all available plots are listed without
being drawn.}

\item{...}{Currently unused. Included for S3 method compatibility.}
}
\value{
The object \code{x}, invisibly. Called for its side effect.
}
\description{
Replays captured plots or reports saved plot file paths from a
\code{visstat} object.
}
\details{
When called without \code{which}, the method lists all available plots
(either as file paths or as indices of captured plots).
When called with \code{which}, the selected plot is displayed:
for file-based output the stored path is printed, for captured plots
the plot is replayed via \code{replayPlot()}.
}
\examples{
# File-based output: plot() lists stored paths
anova_path <- visstat(
  npk$block,
  npk$yield,
  graphicsoutput = "png",
  plotDirectory = tempdir()
)

plot(anova_path)

# Interactive output: plot() lists available plots,
# plot(obj, which = n) replays a specific one
linreg <- visstat(trees$Height, trees$Girth)

plot(linreg)
plot(linreg, which = 2)

}
\seealso{
\code{\link{print.visstat}},
  \code{\link{summary.visstat}}, \code{\link{visstat}}
}
