pub fn plot(&self, x: &[f64], y: &[f64]) {
        // If there is no data to plot, we stop here
        if x.len().min(y.len()) == 0 {
            return;
        }
        unsafe {
            sys::ImPlot_PlotScatterdoublePtrdoublePtr(
                self.label.as_ptr() as *const c_char,
                x.as_ptr(),
                y.as_ptr(),
                x.len().min(y.len()) as i32, // "as" casts saturate as of Rust 1.45. This is safe here.
                0,                           // No offset
                std::mem::size_of::<f64>() as i32, // Stride, set to one f64 for the standard use case
            );
        }
    }
/// Draw a previously-created scatter plot. Use this in closures passed to
/// [`Plot::build()`](struct.Plot.html#method.build)
Draw a previously-created scatter plot.
Draw a previously - created scatter plot .
pub fn plot(&self, x: &[f64], y: &[f64]) {
        // If there is no data to plot, we stop here
        if x.len().min(y.len()) == 0 {
            return;
        }
        unsafe {
            sys::ImPlot_PlotScatterdoublePtrdoublePtr(
                self.label.as_ptr() as *const c_char,
                x.as_ptr(),
                y.as_ptr(),
                x.len().min(y.len()) as i32, // "as" casts saturate as of Rust 1.45. This is safe here.
                0,                           // No offset
                std::mem::size_of::<f64>() as i32, // Stride, set to one f64 for the standard use case
            );
        }
    }
pub fn plot ( & self , x : & [ f64 ] , y : & [ f64 ] ) { // If there is no data to plot, we stop here if x . len ( ) . min ( y . len ( ) ) == 0 { return ; } unsafe { sys :: ImPlot_PlotScatterdoublePtrdoublePtr ( self . label . as_ptr ( ) as * const c_char , x . as_ptr ( ) , y . as_ptr ( ) , x . len ( ) . min ( y . len ( ) ) as i32 , // "as" casts saturate as of Rust 1.45. This is safe here. 0 , // No offset std :: mem :: size_of :: < f64 > ( ) as i32 , // Stride, set to one f64 for the standard use case ) ; } }
Draw a previously-created scatter plot.
Draw a previously - created scatter plot .
&self
x
&[f64]
y
&[f64]
&self
x
&[f64]
y
&[f64]