Skip to content

Commit 689589d

Browse files
committed
add Splom and Parcats charts in examples and book
- add extra png's for book TOC Signed-off-by: Andrei Gherghescu <8067229+andrei-ng@users.noreply.github.com>
1 parent e593cdb commit 689589d

13 files changed

Lines changed: 278 additions & 6 deletions

File tree

‎docs/book/src/SUMMARY.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
- [Bar Charts](./recipes/basic_charts/bar_charts.md)
1717
- [Pie Charts](./recipes/basic_charts/pie_charts.md)
1818
- [Sankey Diagrams](./recipes/basic_charts/sankey_diagrams.md)
19+
- [Parallel Categories](./recipes/basic_charts/parcats_charts.md)
1920
- [Treemap Charts](./recipes/basic_charts/treemap_charts.md)
2021
- [Sunburst Charts](./recipes/basic_charts/sunburst_charts.md)
2122
- [Icicle Charts](./recipes/basic_charts/icicle_charts.md)
@@ -26,6 +27,7 @@
2627
- [Violin Plots](./recipes/statistical_charts/violin_plots.md)
2728
- [Histograms](./recipes/statistical_charts/histograms.md)
2829
- [2D Histograms](./recipes/statistical_charts/histogram2d.md)
30+
- [SPLOM](./recipes/statistical_charts/splom.md)
2931
- [Scientific Charts](./recipes/scientific_charts.md)
3032
- [Contour Plots](./recipes/scientific_charts/contour_plots.md)
3133
- [Heatmaps](./recipes/scientific_charts/heatmaps.md)

‎docs/book/src/recipes/basic_charts.md‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ Line Charts | [![Line Charts](./img/line_shape_options_for_interpolation.png)](.
99
Bar Charts | [![Bar Charts](./img/bar_chart_with_error_bars.png)](./basic_charts/scatter_plots.md)
1010
Pie Charts | [![Pie Charts](./img/pie_charts.png)](./basic_charts/pie_charts.md)
1111
Sankey Diagrams | [![Sankey Diagrams](./img/basic_sankey.png)](./basic_charts/sankey_diagrams.md)
12-
Treemap Charts | [Treemap Charts](./basic_charts/treemap_charts.md)
13-
Sunburst Charts | [Sunburst Charts](./basic_charts/sunburst_charts.md)
14-
Icicle Charts | [Icicle Charts](./basic_charts/icicle_charts.md)
15-
Indicator Charts | [Indicator Charts](./basic_charts/indicator_charts.md)
12+
Parallel Categories | [![Parallel Categories](./img/parallelcat.png)](./basic_charts/parcats_charts.md)
13+
Treemap Charts | [![Treemap Charts](./img/treemap.png)](./basic_charts/treemap_charts.md)
14+
Sunburst Charts | [![Sunburst Charts](./img/sunburst.png)](./basic_charts/sunburst_charts.md)
15+
Icicle Charts | [![Icicle Charts](./img/icicle.png)](./basic_charts/icicle_charts.md)
16+
Indicator Charts | [![Indicator Charts](./img/indicator.png)](./basic_charts/indicator_charts.md)
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Parallel Categories
2+
3+
A parallel categories (`parcats`) chart visualizes multi-dimensional categorical
4+
data as a set of parallel axes, one per category column, with ribbons flowing
5+
between the categories. Like Sankey diagrams, it is domain-based rather than
6+
cartesian — each [`ParcatsDimension`](https://docs.rs/plotly/latest/plotly/parcats/struct.ParcatsDimension.html)
7+
defines one axis, and optional `counts` let you weight aggregated paths instead
8+
of plotting one row per observation.
9+
10+
The following imports have been used to produce the plots below:
11+
12+
```rust,no_run
13+
use plotly::color::NamedColor;
14+
use plotly::common::Domain;
15+
use plotly::layout::Layout;
16+
use plotly::parcats::{
17+
ParcatsArrangement, ParcatsDimension, ParcatsHoverInfo, ParcatsHoverOn, ParcatsLine,
18+
ParcatsLineShape,
19+
};
20+
use plotly::{Parcats, Plot};
21+
```
22+
23+
The `to_inline_html` method is used to produce the html plot displayed in this page.
24+
25+
## Basic Parallel Categories
26+
```rust,no_run
27+
{{#include ../../../../../examples/basic_charts/src/main.rs:basic_parcats}}
28+
```
29+
30+
{{#include ../../../../../examples/basic_charts/output/inline_basic_parcats.html}}
31+
32+
33+
## Styled Parallel Categories
34+
```rust,no_run
35+
{{#include ../../../../../examples/basic_charts/src/main.rs:styled_parcats}}
36+
```
37+
38+
{{#include ../../../../../examples/basic_charts/output/inline_styled_parcats.html}}
22.5 KB
Loading
33.6 KB
Loading
38.8 KB
Loading
157 KB
Loading
27 KB
Loading
17.6 KB
Loading

‎docs/book/src/recipes/statistical_charts.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ Box Plots | [![Line Charts](./img/box_plot.png)](./statistical_charts/box_plots.
99
Violin Plots | [![Violin Plots](./img/violin_plot.png)](./statistical_charts/violin_plots.md)
1010
Histograms | [![Scatter Plots](./img/overlaid_histogram.png)](./statistical_charts/histograms.md)
1111
2D Histograms | [![2D Histograms](./img/basic_histogram2d.png)](./statistical_charts/histogram2d.md)
12+
SPLOM | [![SPLOM](./img/splom.png)](./statistical_charts/splom.md)

0 commit comments

Comments
 (0)