pub fn draw_plot(points: &Vec<Point2D>) {
    let mut data = Vec::new();
    for point in points {
        data.push(point.to_tuple());
    }
    let s1 = plotlib::scatter::Scatter::from_slice(&data).style(
        plotlib::scatter::Style::new()
            .marker(plotlib::style::Marker::Circle)
            .colour("black")
            .size(1.75),
    );
    let v = plotlib::view::ContinuousView::new()
        .add(&s1)
        .x_range(-3.5, 3.5)
        .y_range(-3.5, 3.5)
        .x_label("X-axis")
        .y_label("Y-axis");
    plotlib::page::Page::single(&v).save("scatter.svg");
}
// This code is reffered from plotlib crate's example
This code is reffered from plotlib crate's example
This code is reffered from plotlib crate ' s example
pub fn draw_plot(points: &Vec<Point2D>) {
    let mut data = Vec::new();
    for point in points {
        data.push(point.to_tuple());
    }
    let s1 = plotlib::scatter::Scatter::from_slice(&data).style(
        plotlib::scatter::Style::new()
            .marker(plotlib::style::Marker::Circle)
            .colour("black")
            .size(1.75),
    );
    let v = plotlib::view::ContinuousView::new()
        .add(&s1)
        .x_range(-3.5, 3.5)
        .y_range(-3.5, 3.5)
        .x_label("X-axis")
        .y_label("Y-axis");
    plotlib::page::Page::single(&v).save("scatter.svg");
}
pub fn draw_plot ( points : & Vec < Point2D > ) { let mut data = Vec :: new ( ) ; for point in points { data . push ( point . to_tuple ( ) ) ; } let s1 = plotlib :: scatter :: Scatter :: from_slice ( & data ) . style ( plotlib :: scatter :: Style :: new ( ) . marker ( plotlib :: style :: Marker :: Circle ) . colour ( " " ) . size ( 1.75 ) , ) ; let v = plotlib :: view :: ContinuousView :: new ( ) . add ( & s1 ) . x_range ( - 3.5 , 3.5 ) . y_range ( - 3.5 , 3.5 ) . x_label ( " " ) . y_label ( " " ) ; plotlib :: page :: Page :: single ( & v ) . save ( " " ) ; }
This code is reffered from plotlib crate's example
This code is reffered from plotlib crate ' s example
points
&Vec<Point2D>
points
&Vec<Point2D>