Skip to content

Commit 8c8f9f7

Browse files
mrhrzgmfreeborn
andauthored
Add Scatter3d support (#66)
* scatter 3D plot example running * added 3D line plot and examples for 3d line plot and surface plot * fixes and cleanup * adjusted CHANGELOG.md * adjusted CHANGELOG.md * remove unintentionally included test output file * fix merge * tweak examples * derive Default and sort imports * fix feature-gated import * add tests * update book * fix examples * add plot3d examples to ci * update book * fix newest book examples Co-authored-by: Michael Freeborn <[email protected]>
1 parent fc70391 commit 8c8f9f7

File tree

15 files changed

+1195
-15
lines changed

15 files changed

+1195
-15
lines changed

.github/workflows/dev_ci.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ jobs:
3333
run: cargo run --example statistical_charts --release
3434
- name: Run subplots
3535
run: cargo run --example subplots --release
36+
- name: Run 3D plots
37+
run: cargo run --example plot3d --release
3638

3739
build_windows:
3840
runs-on: windows-latest
@@ -57,6 +59,8 @@ jobs:
5759
run: cargo run --example statistical_charts --release
5860
- name: Run subplots
5961
run: cargo run --example subplots --release
62+
- name: Run 3D plots
63+
run: cargo run --example plot3d --release
6064

6165
build_macos:
6266
runs-on: macos-latest
@@ -81,3 +85,5 @@ jobs:
8185
run: cargo run --example statistical_charts --release
8286
- name: Run subplots
8387
run: cargo run --example subplots --release
88+
- name: Run 3D plots
89+
run: cargo run --example plot3d --release

.github/workflows/release_ci.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ jobs:
3333
run: cargo run --example statistical_charts --release
3434
- name: Run subplots
3535
run: cargo run --example subplots --release
36+
- name: Run 3D plots
37+
run: cargo run --example plot3d --release
3638

3739
build_windows:
3840
runs-on: windows-latest
@@ -57,6 +59,8 @@ jobs:
5759
run: cargo run --example statistical_charts --release
5860
- name: Run subplots
5961
run: cargo run --example subplots --release
62+
- name: Run 3D plots
63+
run: cargo run --example plot3d --release
6064

6165
build_macos:
6266
runs-on: macos-latest
@@ -81,3 +85,5 @@ jobs:
8185
run: cargo run --example statistical_charts --release
8286
- name: Run subplots
8387
run: cargo run --example subplots --release
88+
- name: Run 3D plots
89+
run: cargo run --example plot3d --release

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1313
- Support for WASM environments
1414
- Lots of tests
1515
- Support for `Sankey` diagrams
16+
- `Plot3D`: Add 3D plots for scatter, line and surface data
1617
### Changed
1718
- Improve implementation of `private::NumOrString` to support more primitive types ([Issue
1819
#47](https://github.com/igiagkiozis/plotly/issues/47))

docs/book/src/SUMMARY.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
- [Scatter Plots](./recipes/basic_charts/scatter_plots.md)
1212
- [Line Charts](./recipes/basic_charts/line_charts.md)
1313
- [Bar Charts](./recipes/basic_charts/bar_charts.md)
14+
- [Sankey Diagrams](./recipes/basic_charts/sankey_diagrams.md)
1415
- [Statistical Charts](./recipes/statistical_charts.md)
1516
- [Error Bars](./recipes/statistical_charts/error_bars.md)
1617
- [Box Plots](./recipes/statistical_charts/box_plots.md)
@@ -22,6 +23,8 @@
2223
- [Time Series and Date Axes](./recipes/financial_charts/time_series_and_date_axes.md)
2324
- [Candlestick Charts](./recipes/financial_charts/candlestick_charts.md)
2425
- [OHLC Charts](./recipes/financial_charts/ohlc_charts.md)
26+
- [3D Charts](./recipes/3dcharts.md)
27+
- [Scatter 3D](./recipes/3dcharts/3dcharts.md)
2528
- [Subplots](./recipes/subplots.md)
2629
- [Subplots](./recipes/subplots/subplots.md)
2730
- [Multiple Axes](./recipes/subplots/multiple_axes.md)

docs/book/src/recipes/3dcharts.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# 3D Charts
2+
3+
The complete source code for the following examples can also be found [here](https://github.com/igiagkiozis/plotly/blob/master/plotly/examples/plot3d.rs).
4+
5+
Kind | Link
6+
:---|:----:
7+
Scatter3D |[![Scatter 3D Charts](./img/basic_scatter3d.png)](./3dcharts/3dcharts.md)

0 commit comments

Comments
 (0)