plot.visstat: Plot method for visstat objects

View source: R/visstat_methods.R

plot.visstatR Documentation

Plot method for visstat objects

Description

Replays captured plots or reports saved plot file paths from a visstat object.

Usage

## S3 method for class 'visstat'
plot(x, which = NULL, ...)

Arguments

x

An object of class "visstat", returned by visstat().

which

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

...

Currently unused. Included for S3 method compatibility.

Details

When called without which, the method lists all available plots (either as file paths or as indices of captured plots). When called with which, the selected plot is displayed: for file-based output the stored path is printed, for captured plots the plot is replayed via replayPlot().

Value

The object x, invisibly. Called for its side effect.

See Also

print.visstat, summary.visstat, visstat

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)


visStatistics documentation built on May 13, 2026, 1:08 a.m.