Multidimensional exploratory analysis
Exploring relationships across many numeric variables.
Plotly · Class
go.Parcoords creates an interactive parallel-coordinates trace for multidimensional exploratory analysis. Define variables in dimensions and control sample-path coloring through line.
Parcoords is a graph-object trace for multidimensional exploratory analysis. Supply one dimension definition per variable; each dimension contains aligned sample values, while the line settings control how sample paths are colored and filtered.
plotly.graph_objects.Parcoords(arg=None, customdata=None, dimensions=None, id=None, ids=None, legend=None, legendgrouptitle=None, legendwidth=None, line=None, meta=None, name=None, opacity=None, selected=None, selectedpoints=None, showlegend=None, stream=None, text=None, uid=None, uirevision=None, unselected=None, visible=None, hoverinfo=None, hoverlabel=None, hovertemplate=None, zorder=None, **kwargs)| Name | Type | Description |
|---|---|---|
dimensions | array | A list of dimension definitions describing the plotted variables and their sample values. |
line | object | Trace-level line styling and color configuration, including the color source and colorscale. |
constraintrange | array | An optional initial filtering interval or intervals for a dimension. |
A plotly.graph_objects.Parcoords trace object.
import plotly.graph_objects as go
fig = go.Figure(go.Parcoords(
line=dict(color=[1, 2, 3], colorscale="Viridis"),
dimensions=[
dict(range=[0, 10], label="A", values=[1, 5, 9]),
dict(range=[0, 10], label="B", values=[8, 4, 2]),
],
))
fig.show()Creates a parallel-coordinates trace with two dimensions and colors each sample using a continuous colorscale.
Exploring relationships across many numeric variables.
Marking observations by a numeric category or score.
Restricting displayed observations to selected value intervals.
Parcoords is a trace type used for parallel coordinates and is placed in a figure's data list. Its samples are provided through dimensions, and line.color controls their coloring.
Follow-up: How would you represent several variables? Add a dimension object for each variable, giving each a label and an aligned values array.
Each dimension describes one axis, commonly with range, label, and values. The values at the same index across dimensions describe one sample or line.
Follow-up: What constraint applies across dimensions? Their values vectors must have the same length; excess values are truncated.
Use constraintrange to define the interval selected by a dimension filter. It accepts a two-value interval, or multiple intervals when multiselect is enabled.
Follow-up: What must be true of each interval? Its first value must not exceed its second value.
plotly.graph_objects.Figureplotly.graph_objects.parcoords.Dimensionpx.parallel_coordinates