use plt::*;
fn main() {
let xs: Vec<f64> = (0..=100).map(|n: u32| n as f64 * 0.1).collect();
let ys: Vec<f64> = xs.iter().map(|x| x.powi(3)).collect();
let mut subplot = Subplot::builder()
.label(Axes::X, "x data")
.label(Axes::Y, "y data")
.build();
subplot.plot(&xs, &ys).unwrap();
let mut fig = <Figure>::default();
fig.set_layout(SingleLayout::new(subplot)).unwrap();
fig.draw_file(FileFormat::Png, "example.png").unwrap();
}