Scatter 3D Charts

The following imports have been used to produce the plots below:

#![allow(unused)]
fn main() {
use itertools_num::linspace;
use plotly::common::{
    ColorScale, ColorScalePalette, DashType, Fill, Font, Line, LineShape, Marker, Mode, Title,
};
use plotly::layout::{Axis, BarMode, Layout, Legend, TicksDirection};
use plotly::Sankey;
use rand_distr::{Distribution, Normal, Uniform};
}

The to_inline_html method is used to produce the html plot displayed in this page.

Constructing a basic Scatter 3D plot

#![allow(unused)]
fn main() {
let n: usize = 100;
let t: Vec<f64> = linspace(0., 10., n).collect();
let y: Vec<f64> = t.iter().map(|x| x.sin()).collect();
let z: Vec<f64> = t.iter().map(|x| x.cos()).collect();

let trace = Scatter3D::new(t, y, z).mode(Mode::Markers);
let mut plot = Plot::new();
plot.add_trace(trace);
}