autoplot.sp_comparison: Plot a comparison of real and synthetic data

autoplot.sp_comparisonR Documentation

Plot a comparison of real and synthetic data

Description

Plot a comparison of real and synthetic data

Usage

## S3 method for class 'sp_comparison'
autoplot(
  object,
  type = c("marginals", "association", "qq", "pairs", "dcr"),
  ...
)

## S3 method for class 'sp_comparison'
plot(x, type = c("marginals", "association", "qq", "pairs", "dcr"), ...)

Arguments

object, x

An sp_comparison from compare_synthetic().

type

What to plot: "marginals", "association", "qq", "pairs" or "dcr".

...

Passed to the underlying plot function.

Value

autoplot() returns a ggplot (or sp_plot_list); plot() prints it and returns it invisibly.

Examples

syn <- synthesize(iris, seed = 1)
cmp <- compare_synthetic(iris, syn, seed = 1)
plot(cmp, type = "qq")

SynthesizerPlus documentation built on Oct. 16, 2026, 5:10 p.m.