In a parallel coordinates plot, each row of data_frame is represented by
a polyline mark which traverses a set of parallel axes, one for each of
the dimensions.
Usage
px_parallel_coordinates(
data_frame = NULL,
dimensions = NULL,
color = NULL,
labels = NULL,
color_continuous_scale = NULL,
range_color = NULL,
color_continuous_midpoint = NULL,
title = NULL,
subtitle = NULL,
template = NULL,
width = NULL,
height = NULL
)Arguments
- data_frame
A data.frame, data.table, list or matrix. Needed for column names to be used in the other arguments; if
NULL, a data frame is built from the vectors given in the other arguments.- dimensions
Column names in
data_frame(a character vector or a formula such as~c(a, b)), or a list of column names, formulas and vectors. Values from these columns are used for multidimensional visualization.- color
A column name in
data_frame, a vector of values, a one-sided formula evaluated indata_frame(e.g.~ log(pop)),px_constant()orpx_range(). Values from this column or vector are used to assign color to marks.- labels
Named character vector or list mapping column names to the labels to use for axis titles, legend entries and hover text, e.g.
c(gdpPercap = "GDP per capita").- color_continuous_scale
Character vector of colors, e.g.
px_colors$sequential$Viridis, or the name of a scale in px_colors. Used whencoloris numeric. Defaults to the template's sequential colorscale.- range_color
If provided, overrides auto-scaling on the continuous color scale.
- color_continuous_midpoint
If set, computes the bounds of the continuous color scale to have the desired midpoint. Setting this value is recommended when using
plotly.express.colors.divergingcolor scales as the inputs tocolor_continuous_scale.- title
The figure title.
- subtitle
The figure subtitle.
- template
A template name (see
template_names()) or a template list. Defaults todefault_template().- width
The figure width in pixels.
- height
The figure height in pixels.
Value
A go_figure().
See also
Other plotly express:
px_area(),
px_bar(),
px_bar_polar(),
px_box(),
px_choropleth(),
px_choropleth_map(),
px_density_contour(),
px_density_heatmap(),
px_density_map(),
px_ecdf(),
px_funnel(),
px_funnel_area(),
px_histogram(),
px_icicle(),
px_imshow(),
px_line(),
px_line_3d(),
px_line_geo(),
px_line_map(),
px_line_polar(),
px_line_ternary(),
px_parallel_categories(),
px_pie(),
px_scatter(),
px_scatter_3d(),
px_scatter_geo(),
px_scatter_map(),
px_scatter_matrix(),
px_scatter_polar(),
px_scatter_ternary(),
px_strip(),
px_sunburst(),
px_timeline(),
px_treemap(),
px_violin()
Examples
px_data_iris() |>
px_parallel_coordinates(color = ~species_id,
dimensions = ~c(sepal_width, sepal_length, petal_width, petal_length))