plot_parallel: Plot parallel coordinates

View source: R/grf_parallel.R

plot_parallelR Documentation

Plot parallel coordinates

Description

Parallel coordinates plot for multivariate data, with lines colored by group.

Usage

plot_parallel(data, columns, group, colors = NULL, title = NULL)

Arguments

data

data.frame

columns

numeric columns to include (indices or names)

group

grouping column (index or name)

colors

optional vector of colors for groups

title

optional title

Details

Each selected variable becomes a parallel vertical axis and each observation a polyline crossing them, so class separation and multivariate patterns stand out. Variables are standardized per column (z-score) before plotting so axes on different scales are comparable.

Value

returns a ggplot2::ggplot graphic

References

Inselberg, A. (1985). The plane with parallel coordinates. The Visual Computer, 1(2), 69-91. Wickham, H. (2016). ggplot2: Elegant Graphics for Data Analysis. Springer.

Examples

data(iris)
grf <- plot_parallel(iris, columns = 1:4, group = 5)
plot(grf)

daltoolbox documentation built on Nov. 23, 2026, 9:08 a.m.