extern crate plotter; use plotter::plotter; use std::f64; fn main() { let mut data = plotter::Dataset::from_fn(&func, (-10.0, 10.0), 1.0, None); let other = plotter::Dataset::from_fn(&o, (-10.0, 10.0), 1.0, None); data.join(other); let app = plotter::Plotter::new(data); let opt = plotter::PlotOptions::new() .with_fg(String::from("black")) .with_shape((5.0, 5.0)); app.plot((640, 480), "test", String::from("12345"), opt); } fn func(x: f64) -> f64 { x } fn o(x: f64) -> f64 { x * 2.0 }