plt_parallel_coordinates {kdry} | R Documentation |
plt_parallel_coordinates
Description
Parallel coordinates plot
Usage
plt_parallel_coordinates(
data,
cols = NULL,
color_variable = NULL,
color_args = list(alpha = 0.6, begin = 0.1, end = 0.9, option = "inferno", direction =
1),
line_jitter = list(w = 0.04, h = 0.04),
text_label_size = 3.5
)
Arguments
data |
A data.table object with the columns containing the parameters to be plotted with the parallel coordinates plot. |
cols |
A character vector with column names to subset |
color_variable |
A character. The name of the column to be used to
colorize the lines of the plot (default: |
color_args |
A list with parameters for the color gradient (see details). |
line_jitter |
A list with the elements |
text_label_size |
A numeric value to define the size of the text
annotations (default: |
Details
The color gradient of the plotted lines can be defined with a list
provided to the argument color_args
. Its default values are
alpha = 0.6
, begin = .1
, end = .9
, option = "inferno"
, and
direction = 1
and are passed furhter on to
ggplot2::scale_color_viridis_c()
.
The implementation to display categorical variables is still experimental.
Value
Returns a parallel coordinates plot as ggplot2
object.
See Also
ggplot2::scale_color_viridis_c()
Examples
if (require("ggplot2")) {
data("iris")
plt_parallel_coordinates(
data = data.table::as.data.table(iris[, -5]),
cols = colnames(iris)[c(-1, -5)],
color_variable = "Sepal.Length"
)
}