Parcoords
Overview
The parcoords trace type is used to create parallel coordinates plots, which are useful for visualizing multi-dimensional numerical data. In parallel coordinates plots, each variable is represented as a vertical axis, and each data point is a line connecting its values across the different axes.
You can customize the axis scaling, color mapping, and line properties to represent your data effectively.
Common Uses
- Multivariate Data Analysis: Visualizing relationships between multiple variables.
- Data Exploration: Exploring patterns and outliers in high-dimensional datasets.
- Decision Making: Identifying optimal points or anomalies in multi-variable data.
Check out the Attributes for the full set of configuration options
Examples
Common Configurations
Here's a simple parcoords plot visualizing three numerical variables:

You can copy this code below to create this chart in your project:
models:
- name: parcoords-data
args:
- echo
- |
variable_1,variable_2,variable_3
1,4,7
2,5,8
3,6,9
traces:
- name: Simple Parcoords Plot
model: ${ref(parcoords-data)}
props:
type: parcoords
dimensions:
- label: "Variable 1"
values: ?{variable_1}
- label: "Variable 2"
values: ?{variable_2}
- label: "Variable 3"
values: ?{variable_3}
line:
color: ?{variable_3}
colorscale: "Viridis"
charts:
- name: Simple Parcoords Chart
traces:
- ${ref(Simple Parcoords Plot)}
layout:
title:
text: Simple Parcoords Plot<br><sub>Parallel Coordinates with Three Variables</sub>
This example demonstrates a parcoords plot with custom axis ranges, allowing you to focus on specific data ranges:

Here's the code:
models:
- name: parcoords-data-ranges
args:
- echo
- |
variable_1,variable_2,variable_3
5,10,15
10,20,25
15,30,35
traces:
- name: Parcoords Plot with Custom Ranges
model: ${ref(parcoords-data-ranges)}
props:
type: parcoords
dimensions:
- label: "Variable 1"
values: ?{variable_1}
range: [5, 15]
- label: "Variable 2"
values: ?{variable_2}
range: [10, 30]
- label: "Variable 3"
values: ?{variable_3}
range: [15, 35]
line:
color: ?{variable_3}
colorscale: "Blues"
charts:
- name: Parcoords Chart with Custom Ranges
traces:
- ${ref(Parcoords Plot with Custom Ranges)}
layout:
title:
text: Parcoords Plot with Custom Ranges<br><sub>Custom Ranges for Each Variable</sub>
Here's a parcoords plot with a custom colorscale for the lines, highlighting the variations across the third variable:

Here's the code:
models:
- name: parcoords-data-colorscale
args:
- echo
- |
variable_1,variable_2,variable_3
1,2,3
2,3,4
3,4,5
traces:
- name: Parcoords Plot with Custom Colorscale
model: ${ref(parcoords-data-colorscale)}
props:
type: parcoords
dimensions:
- label: "Variable 1"
values: ?{variable_1}
- label: "Variable 2"
values: ?{variable_2}
- label: "Variable 3"
values: ?{variable_3}
line:
color: ?{variable_3}
colorscale: "Jet"
charts:
- name: Parcoords Chart with Custom Colorscale
traces:
- ${ref(Parcoords Plot with Custom Colorscale)}
layout:
title:
text: Parcoords Plot with Custom Colorscale<br><sub>Custom Colors for Line Based on Variable 3</sub>
A schema to validate plotly trace properties
Attributes
These attributes apply to traces where trace.props.type is set to parcoords. You would configure these attributes on the trace with the trace.props object.
customdata: 'array' #(1)!
customdatasrc: 'string' #(2)!
dimensions: array
domain:
column: 'integer' #(3)!
row: 'integer' #(4)!
x: 'array' #(5)!
y: 'array' #(6)!
ids: 'array' #(7)!
idssrc: 'string' #(8)!
labelangle: 'number' #(9)!
labelfont:
color: any
family: 'string' #(10)!
lineposition: 'string' #(11)!
shadow: 'string' #(12)!
size: number
style: 'any' #(13)!
textcase: 'any' #(14)!
variant: 'any' #(15)!
weight: 'integer' #(16)!
labelside: 'any' #(17)!
legend: 'string' #(18)!
legendgrouptitle:
font:
color: any
family: 'string' #(19)!
lineposition: 'string' #(20)!
shadow: 'string' #(21)!
size: number
style: 'any' #(22)!
textcase: 'any' #(23)!
variant: 'any' #(24)!
weight: 'integer' #(25)!
text: 'string' #(26)!
legendrank: 'number' #(27)!
legendwidth: 'number' #(28)!
line:
autocolorscale: 'boolean' #(29)!
cauto: 'boolean' #(30)!
cmax: 'number' #(31)!
cmid: 'number' #(32)!
cmin: 'number' #(33)!
color: 'color | array' #(34)!
coloraxis: 'string' #(35)!
colorbar:
bgcolor: 'any' #(36)!
bordercolor: 'any' #(37)!
borderwidth: 'number' #(38)!
exponentformat: 'any' #(39)!
len: 'number' #(40)!
lenmode: 'any' #(41)!
minexponent: 'number' #(42)!
nticks: 'integer' #(43)!
orientation: 'any' #(44)!
outlinecolor: 'any' #(45)!
outlinewidth: 'number' #(46)!
separatethousands: 'boolean' #(47)!
showexponent: 'any' #(48)!
showticklabels: 'boolean' #(49)!
showtickprefix: 'any' #(50)!
showticksuffix: 'any' #(51)!
thickness: 'number' #(52)!
thicknessmode: 'any' #(53)!
tickangle: 'number' #(54)!
tickcolor: 'any' #(55)!
tickfont:
color: any
family: 'string' #(56)!
lineposition: 'string' #(57)!
shadow: 'string' #(58)!
size: number
style: 'any' #(59)!
textcase: 'any' #(60)!
variant: 'any' #(61)!
weight: 'integer' #(62)!
tickformat: 'string' #(63)!
tickformatstops: array
ticklabeloverflow: 'any' #(64)!
ticklabelposition: 'any' #(65)!
ticklabelstep: 'integer' #(66)!
ticklen: 'number' #(67)!
tickmode: 'any' #(68)!
tickprefix: 'string' #(69)!
ticks: 'any' #(70)!
ticksuffix: 'string' #(71)!
ticktext: 'array' #(72)!
ticktextsrc: 'string' #(73)!
tickvals: 'array' #(74)!
tickvalssrc: 'string' #(75)!
tickwidth: 'number' #(76)!
title:
font:
color: any
family: 'string' #(77)!
lineposition: 'string' #(78)!
shadow: 'string' #(79)!
size: number
style: 'any' #(80)!
textcase: 'any' #(81)!
variant: 'any' #(82)!
weight: 'integer' #(83)!
side: 'any' #(84)!
text: 'string' #(85)!
x: 'number' #(86)!
xanchor: 'any' #(87)!
xpad: 'number' #(88)!
xref: 'any' #(89)!
y: 'number' #(90)!
yanchor: 'any' #(91)!
ypad: 'number' #(92)!
yref: 'any' #(93)!
colorscale: 'any' #(94)!
colorsrc: 'string' #(95)!
reversescale: 'boolean' #(96)!
showscale: 'boolean' #(97)!
metasrc: 'string' #(98)!
name: 'string' #(99)!
rangefont:
color: any
family: 'string' #(100)!
lineposition: 'string' #(101)!
shadow: 'string' #(102)!
size: number
style: 'any' #(103)!
textcase: 'any' #(104)!
variant: 'any' #(105)!
weight: 'integer' #(106)!
stream:
maxpoints: 'number' #(107)!
token: 'string' #(108)!
tickfont:
color: any
family: 'string' #(109)!
lineposition: 'string' #(110)!
shadow: 'string' #(111)!
size: number
style: 'any' #(112)!
textcase: 'any' #(113)!
variant: 'any' #(114)!
weight: 'integer' #(115)!
type: parcoords
uid: 'string' #(116)!
unselected:
line:
color: 'any' #(117)!
opacity: 'number' #(118)!
visible: 'any' #(119)!
- Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, scatter traces also appends customdata items in the markers DOM elements
- Sets the source reference on Chart Studio Cloud for
customdata. - If there is a layout grid, use the domain for this column in the grid for this parcoords trace .
- If there is a layout grid, use the domain for this row in the grid for this parcoords trace .
- Sets the horizontal domain of this parcoords trace (in plot fraction).
- Sets the vertical domain of this parcoords trace (in plot fraction).
- Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
- Sets the source reference on Chart Studio Cloud for
ids. - Sets the angle of the labels with respect to the horizontal. For example, a
tickangleof -90 draws the labels vertically. Tilted labels with labelangle may be positioned better inside margins whenlabelpositionis set to bottom. - HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.
- Sets the kind of decoration line(s) with text, such as an under, over or through as well as combinations e.g. under+over, etc.
- Sets the shape and color of the shadow behind text. auto places minimal shadow and applies contrast text font color. See https://developer.mozilla.org/en-US/docs/Web/CSS/text-shadow for additional options.
- Sets whether a font should be styled with a normal or italic face from its family.
- Sets capitalization of text. It can be used to make text appear in all-uppercase or all-lowercase, or with each word capitalized.
- Sets the variant of the font.
- Sets the weight (or boldness) of the font.
- Specifies the location of the
label. top positions labels above, next to the title bottom positions labels below the graph Tilted labels with labelangle may be positioned better inside margins whenlabelpositionis set to bottom. - Sets the reference to a legend to show this trace in. References to these legends are legend, legend2, legend3, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc. - HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.
- Sets the kind of decoration line(s) with text, such as an under, over or through as well as combinations e.g. under+over, etc.
- Sets the shape and color of the shadow behind text. auto places minimal shadow and applies contrast text font color. See https://developer.mozilla.org/en-US/docs/Web/CSS/text-shadow for additional options.
- Sets whether a font should be styled with a normal or italic face from its family.
- Sets capitalization of text. It can be used to make text appear in all-uppercase or all-lowercase, or with each word capitalized.
- Sets the variant of the font.
- Sets the weight (or boldness) of the font.
- Sets the title of the legend group.
- Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with reversed
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout. - Sets the width (in px or fraction) of the legend for this trace.
- Determines whether the colorscale is a default palette (
autocolorscale: true) or the palette determined byline.colorscale. Has an effect only if inline.coloris set to a numerical array. In casecolorscaleis unspecified orautocolorscaleis true, the default palette will be chosen according to whether numbers in thecolorarray are all positive, all negative or mixed. - Determines whether or not the color domain is computed with respect to the input data (here in
line.color) or the bounds set inline.cminandline.cmaxHas an effect only if inline.coloris set to a numerical array. Defaults tofalsewhenline.cminandline.cmaxare set by the user. - Sets the upper bound of the color domain. Has an effect only if in
line.coloris set to a numerical array. Value should have the same units as inline.colorand if set,line.cminmust be set as well. - Sets the mid-point of the color domain by scaling
line.cminand/orline.cmaxto be equidistant to this point. Has an effect only if inline.coloris set to a numerical array. Value should have the same units as inline.color. Has no effect whenline.cautoisfalse. - Sets the lower bound of the color domain. Has an effect only if in
line.coloris set to a numerical array. Value should have the same units as inline.colorand if set,line.cmaxmust be set as well. - Sets the line color. It accepts either a specific color or an array of numbers that are mapped to the colorscale relative to the max and min values of the array or relative to
line.cminandline.cmaxif set. - Sets a reference to a shared color axis. References to these shared color axes are coloraxis, coloraxis2, coloraxis3, etc. Settings for these shared color axes are set in the layout, under
layout.coloraxis,layout.coloraxis2, etc. Note that multiple color scales can be linked to the same color axis. - Sets the color of padded area.
- Sets the axis line color.
- Sets the width (in px) or the border enclosing this color bar.
- Determines a formatting rule for the tick exponents. For example, consider the number 1,000,000,000. If none, it appears as 1,000,000,000. If e, 1e+9. If E, 1E+9. If power, 1x10^9 (with 9 in a super script). If SI, 1G. If B, 1B.
- Sets the length of the color bar This measure excludes the padding of both ends. That is, the color bar length is this length minus the padding on both ends.
- Determines whether this color bar's length (i.e. the measure in the color variation direction) is set in units of plot fraction or in *pixels. Use
lento set the value. - Hide SI prefix for 10^n if |n| is below this number. This only has an effect when
tickformatis SI or B. - Specifies the maximum number of ticks for the particular axis. The actual number of ticks will be chosen automatically to be less than or equal to
nticks. Has an effect only iftickmodeis set to auto. - Sets the orientation of the colorbar.
- Sets the axis line color.
- Sets the width (in px) of the axis line.
- If "true", even 4-digit integers are separated
- If all, all exponents are shown besides their significands. If first, only the exponent of the first tick is shown. If last, only the exponent of the last tick is shown. If none, no exponents appear.
- Determines whether or not the tick labels are drawn.
- If all, all tick labels are displayed with a prefix. If first, only the first tick is displayed with a prefix. If last, only the last tick is displayed with a suffix. If none, tick prefixes are hidden.
- Same as
showtickprefixbut for tick suffixes. - Sets the thickness of the color bar This measure excludes the size of the padding, ticks and labels.
- Determines whether this color bar's thickness (i.e. the measure in the constant color direction) is set in units of plot fraction or in pixels. Use
thicknessto set the value. - Sets the angle of the tick labels with respect to the horizontal. For example, a
tickangleof -90 draws the tick labels vertically. - Sets the tick color.
- HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.
- Sets the kind of decoration line(s) with text, such as an under, over or through as well as combinations e.g. under+over, etc.
- Sets the shape and color of the shadow behind text. auto places minimal shadow and applies contrast text font color. See https://developer.mozilla.org/en-US/docs/Web/CSS/text-shadow for additional options.
- Sets whether a font should be styled with a normal or italic face from its family.
- Sets capitalization of text. It can be used to make text appear in all-uppercase or all-lowercase, or with each word capitalized.
- Sets the variant of the font.
- Sets the weight (or boldness) of the font.
- Sets the tick label formatting rule using d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time-format/tree/v2.2.3#locale_format. We add two items to d3's date formatter: %h for half of the year as a decimal number as well as %{n}f for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat %H~%M~%S.%2f would display 09~15~23.46
- Determines how we handle tick labels that would overflow either the graph div or the domain of the axis. The default value for inside tick labels is hide past domain. In other cases the default is hide past div.
- Determines where tick labels are drawn relative to the ticks. Left and right options are used when
orientationis h, top and bottom whenorientationis v. - Sets the spacing between tick labels as compared to the spacing between ticks. A value of 1 (default) means each tick gets a label. A value of 2 means shows every 2nd label. A larger value n means only every nth tick is labeled.
tick0determines which labels are shown. Not implemented for axes withtypelog or multicategory, or whentickmodeis array. - Sets the tick length (in px).
- Sets the tick mode for this axis. If auto, the number of ticks is set via
nticks. If linear, the placement of the ticks is determined by a starting positiontick0and a tick stepdtick(linear is the default value iftick0anddtickare provided). If array, the placement of the ticks is set viatickvalsand the tick text isticktext. (array is the default value iftickvalsis provided). - Sets a tick label prefix.
- Determines whether ticks are drawn or not. If , this axis' ticks are not drawn. If outside (inside), this axis' are drawn outside (inside) the axis lines.
- Sets a tick label suffix.
- Sets the text displayed at the ticks position via
tickvals. Only has an effect iftickmodeis set to array. Used withtickvals. - Sets the source reference on Chart Studio Cloud for
ticktext. - Sets the values at which ticks on this axis appear. Only has an effect if
tickmodeis set to array. Used withticktext. - Sets the source reference on Chart Studio Cloud for
tickvals. - Sets the tick width (in px).
- HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.
- Sets the kind of decoration line(s) with text, such as an under, over or through as well as combinations e.g. under+over, etc.
- Sets the shape and color of the shadow behind text. auto places minimal shadow and applies contrast text font color. See https://developer.mozilla.org/en-US/docs/Web/CSS/text-shadow for additional options.
- Sets whether a font should be styled with a normal or italic face from its family.
- Sets capitalization of text. It can be used to make text appear in all-uppercase or all-lowercase, or with each word capitalized.
- Sets the variant of the font.
- Sets the weight (or boldness) of the font.
- Determines the location of color bar's title with respect to the color bar. Defaults to top when
orientationif v and defaults to right whenorientationif h. - Sets the title of the color bar.
- Sets the x position with respect to
xrefof the color bar (in plot fraction). Whenxrefis paper, defaults to 1.02 whenorientationis v and 0.5 whenorientationis h. Whenxrefis container, defaults to 1 whenorientationis v and 0.5 whenorientationis h. Must be between 0 and 1 ifxrefis container and between -2 and 3 ifxrefis paper. - Sets this color bar's horizontal position anchor. This anchor binds the
xposition to the left, center or right of the color bar. Defaults to left whenorientationis v and center whenorientationis h. - Sets the amount of padding (in px) along the x direction.
- Sets the container
xrefers to. container spans the entirewidthof the plot. paper refers to the width of the plotting area only. - Sets the y position with respect to
yrefof the color bar (in plot fraction). Whenyrefis paper, defaults to 0.5 whenorientationis v and 1.02 whenorientationis h. Whenyrefis container, defaults to 0.5 whenorientationis v and 1 whenorientationis h. Must be between 0 and 1 ifyrefis container and between -2 and 3 ifyrefis paper. - Sets this color bar's vertical position anchor This anchor binds the
yposition to the top, middle or bottom of the color bar. Defaults to middle whenorientationis v and bottom whenorientationis h. - Sets the amount of padding (in px) along the y direction.
- Sets the container
yrefers to. container spans the entireheightof the plot. paper refers to the height of the plotting area only. - Sets the colorscale. Has an effect only if in
line.coloris set to a numerical array. The colorscale must be an array containing arrays mapping a normalized value to an rgb, rgba, hex, hsl, hsv, or named color string. At minimum, a mapping for the lowest (0) and highest (1) values are required. For example,[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]. To control the bounds of the colorscale in color space, useline.cminandline.cmax. Alternatively,colorscalemay be a palette name string of the following list: Blackbody,Bluered,Blues,Cividis,Earth,Electric,Greens,Greys,Hot,Jet,Picnic,Portland,Rainbow,RdBu,Reds,Viridis,YlGnBu,YlOrRd. - Sets the source reference on Chart Studio Cloud for
color. - Reverses the color mapping if true. Has an effect only if in
line.coloris set to a numerical array. If true,line.cminwill correspond to the last color in the array andline.cmaxwill correspond to the first color. - Determines whether or not a colorbar is displayed for this trace. Has an effect only if in
line.coloris set to a numerical array. - Sets the source reference on Chart Studio Cloud for
meta. - Sets the trace name. The trace name appears as the legend item and on hover.
- HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.
- Sets the kind of decoration line(s) with text, such as an under, over or through as well as combinations e.g. under+over, etc.
- Sets the shape and color of the shadow behind text. auto places minimal shadow and applies contrast text font color. See https://developer.mozilla.org/en-US/docs/Web/CSS/text-shadow for additional options.
- Sets whether a font should be styled with a normal or italic face from its family.
- Sets capitalization of text. It can be used to make text appear in all-uppercase or all-lowercase, or with each word capitalized.
- Sets the variant of the font.
- Sets the weight (or boldness) of the font.
- Sets the maximum number of points to keep on the plots from an incoming stream. If
maxpointsis set to 50, only the newest 50 points will be displayed on the plot. - The stream id number links a data trace on a plot with a stream. See https://chart-studio.plotly.com/settings for more details.
- HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.
- Sets the kind of decoration line(s) with text, such as an under, over or through as well as combinations e.g. under+over, etc.
- Sets the shape and color of the shadow behind text. auto places minimal shadow and applies contrast text font color. See https://developer.mozilla.org/en-US/docs/Web/CSS/text-shadow for additional options.
- Sets whether a font should be styled with a normal or italic face from its family.
- Sets capitalization of text. It can be used to make text appear in all-uppercase or all-lowercase, or with each word capitalized.
- Sets the variant of the font.
- Sets the weight (or boldness) of the font.
- Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
- Sets the base color of unselected lines. in connection with
unselected.line.opacity. - Sets the opacity of unselected lines. The default auto decreases the opacity smoothly as the number of lines increases. Use 1 to achieve exact
unselected.line.color. - Determines whether or not this trace is visible. If legendonly, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).