Macro plot

Source
macro_rules! plot {
    ($title:expr, $($ys:expr), +) => { ... };
}
Expand description

Plot a one-dimensional vector using Plotly.

The passed vector is plotted with index on the x-axis and elements as values on the y-axis.

First argument : &str Title of the graph

Second and subsequent arguments: impl IntoIterator<Item={number}> Vector(s) to plot.

ยงExamples

let range = 0..100;
let sin_iter = (0..150).map(|x| (x as f32 / 10.0).sin() * 20.0);
simple_plot::plot!("title", range, sin_iter);