plot_pairs: Scatter-plot matrix of real and/or synthetic data

plot_pairsR Documentation

Scatter-plot matrix of real and/or synthetic data

Description

Pairwise scatter plots of numeric variables, with real and synthetic records side by side (columns of the panel grid are variables, the colour identifies the source). Useful to inspect multivariate structure, also for data generated with r_mvdist() or mvdist functions.

Usage

plot_pairs(
  real,
  synthetic = NULL,
  vars = NULL,
  max_points = 1500L,
  alpha = 0.35
)

Arguments

real

A data frame (or vector/matrix) with the real data.

synthetic

Optional synthetic data with the same columns.

vars

Variables to plot (default: all, up to max_vars per kind).

max_points

Maximum number of points drawn per data set.

alpha

Point transparency.

Value

A ggplot object.

Examples

syn <- synthesize(iris, seed = 1)
plot_pairs(iris, syn, vars = c("Sepal.Length", "Petal.Length", "Petal.Width"))

x <- as.data.frame(r_copula(1000, "clayton", dim = 3, theta = 3, seed = 1))
plot_pairs(x)

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