ggplot_parallel {DEXiR} | R Documentation |
Makes a basic ggplot2
chart for displaying DEXi alternatives using parallel axes.
Generally, axes are uniformly scaled to the [0,1]
interval.
ggplot_parallel(
model,
alternatives = NULL,
attids = NULL,
aggregate = c("minmax", "min", "max", "mean", "none"),
name = "name",
shift = 0.01
)
model |
A DexiModel object. Required. |
alternatives |
A |
attids |
|
aggregate |
One of |
name |
|
shift |
|
Uses GGally::ggparcoord()
and requires package "GGally" to be installed.
Data presented in the chart is prepared by scale_alternatives()
.
A basic 'ggplot2' chart. Generally, this chart needs to be further enhanced
by graph layers, such as themes, labels, geom_points()
and geom_line()
.
See plotalt_parallel()
that already provides some such layers.
scale_alternatives()
, plotalt_parallel()
if (requireNamespace("GGally", quietly = TRUE)) {
# Load "Car.dxi"
CarDxi <- system.file("extdata", "Car.dxi", package = "DEXiR")
Car <- read_dexi(CarDxi)
# Plot all Car$alternatives with points and lines
ggplot_parallel(Car) + ggplot2::geom_line(linewidth = 2) + ggplot2::geom_point(size = 3)
}