(** // can't yet format YamlFrontmatter (["title: Parallel categories"; "category: Categorical Charts"; "categoryindex: 10"; "index: 1"], Some { StartLine = 2 StartColumn = 0 EndLine = 6 EndColumn = 8 }) to pynb markdown # Parallel categories [![Binder](https://plotly.net/img/badge-binder.svg)](https://mybinder.org/v2/gh/plotly/Plotly.NET/gh-pages?filepath=09_0_parallel-categories.ipynb)  [![Script](https://plotly.net/img/badge-script.svg)](https://plotly.net/09_0_parallel-categories.fsx)  [![Notebook](https://plotly.net/img/badge-notebook.svg)](https://plotly.net/09_0_parallel-categories.ipynb) *Summary:* This example shows how to create parallel categories plot in F#. The parallel categories diagram (also known as parallel sets or alluvial diagram) is a visualization of multi-dimensional categorical data sets. Each variable in the data set is represented by a column of rectangles, where each rectangle corresponds to a discrete value taken on by that variable. The relative heights of the rectangles reflect the relative frequency of occurrence of the corresponding value. Combinations of category rectangles across dimensions are connected by ribbons, where the height of the ribbon corresponds to the relative frequency of occurrence of the combination of categories in the data set. *) open Plotly.NET open Plotly.NET.TraceObjects let dims = [ Dimension.initParallel(Values = ["Cat1";"Cat1";"Cat1";"Cat1";"Cat2";"Cat2";"Cat3"],Label="A") Dimension.initParallel(Values = [0;1;0;1;0;0;0],Label="B",TickText=["YES";"NO"]) ] let parcats = Chart.ParallelCategories( dims, LineColor = Color.fromColorScaleValues [0.;1.;0.;1.;0.;0.;0.], LineColorScale = StyleParam.Colorscale.Blackbody )(* output:
*) (** ## More styled example This example shows the usage of some of the styling possibility using `Chart.ParallelCategories`. For even more styling control, use the respective TraceStyle function `TraceDomainStyle.ParallelCategories` *) let parcatsStyled = let dims = [ Dimension.initParallel(Values = ["A";"A";"A";"B";"B";"B";"C";"D"],Label="Lvl1") Dimension.initParallel(Values = ["AA";"AA";"AB";"AB";"AB";"AB";"AB";"AB"],Label="Lvl2") Dimension.initParallel(Values = ["AAA";"AAB";"AAC";"AAC";"AAB";"AAB";"AAA";"AAA"],Label="Lvl3") ] Chart.ParallelCategories( dims, LineColor = Color.fromColorScaleValues [0; 1; 2; 2; 1; 1; 0; 0], // These values map to the last category axis, meaning [AAA => 0; AAB = 1; AAC => 2] LineColorScale = StyleParam.Colorscale.Viridis, BundleColors = false )(* output:
*)