simple-plot

Latest version Documentation MIT

Provides a macro plot!() that plots a one-dimensional vector (impl IntoIterator<Item={number}>) using Plotly.

There is no need for complicated settings; simply pass to plot!() the title of the graph and the vectors you wish to plot, and the graph will be displayed.

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

Usage/Examples

In Cargo.toml [dependencies] simple-plot = "0.1.0" ```rust let range = 0..100; let siniter = (0..150).map(|x| (x as f32 / 10.0).sin() * 20.0); let parabolavec:Vec = (-10..10).map(|x| x*x - 30).collect(); let cosvec: Vec = (0..150).map(|x| (x as f32 / 20.0).cos() * 10.0).collect(); let cosslcie: &[f32] = &cos_vec;

simpleplot::plot!("title", range, siniter, parabolavec, cosslcie); ``` Result result

What this library cannot do

If you need these functions, use plotly