pub fn draw<'a, T, U>(&mut self, x: &'a T, y: &'a T, z: &'a T)
    where
        T: AsMatrix<'a, U>,
        U: 'a + std::fmt::Display,
    {
        matrix_to_array(&mut self.buffer, "x", x);
        matrix_to_array(&mut self.buffer, "y", y);
        matrix_to_array(&mut self.buffer, "z", z);
        if self.colors.len() > 0 {
            vector_to_strings(&mut self.buffer, "colors", &self.colors);
        }
        if self.levels.len() > 0 {
            vector_to_array(&mut self.buffer, "levels", &self.levels);
        }
        let opt = self.options_filled();
        write!(&mut self.buffer, "cf=plt.contourf(x,y,z{})\n", &opt).unwrap();
        if !self.no_lines {
            let opt_line = self.options_line();
            write!(&mut self.buffer, "cl=plt.contour(x,y,z{})\n", &opt_line).unwrap();
            if !self.no_labels {
                let opt_label = self.options_label();
                write!(&mut self.buffer, "plt.clabel(cl{})\n", &opt_label).unwrap();
            }
        }
        if !self.no_colorbar {
            let opt_colorbar = self.options_colorbar();
            write!(&mut self.buffer, "cb=plt.colorbar(cf{})\n", &opt_colorbar).unwrap();
            if self.colorbar_label != "" {
                write!(&mut self.buffer, "cb.ax.set_ylabel(r'{}')\n", self.colorbar_label).unwrap();
            }
        }
        if self.with_selected {
            let opt_selected = self.options_selected();
            write!(&mut self.buffer, "plt.contour(x,y,z{})\n", &opt_selected).unwrap();
        }
    }
/// Draws a fancy contour: filled contour with a line contour and a colorbar
///
/// # Input
///
/// * `x` -- matrix with x values
/// * `y` -- matrix with y values
/// * `z` -- matrix with z values
///
/// # Flags
///
/// The following flags control what features are not to be drawn:
///
/// * `no_lines` -- skip drawing a lines contour on top of the filled contour
/// * `no_labels` -- skip adding labels to the lines contour (if enabled)
/// * `no_colorbar` -- skip drawing a colorbar
/// * `with_selected` -- draw a line contour with a selected level (e.g., 0.0) on top of everything
///
/// # Notes
///
/// * The type `U` of the input matrices must be a number.
///
Draws a fancy contour: filled contour with a line contour and a colorbar
Draws a fancy contour : filled contour with a line contour and a colorbar
pub fn draw<'a, T, U>(&mut self, x: &'a T, y: &'a T, z: &'a T)
    where
        T: AsMatrix<'a, U>,
        U: 'a + std::fmt::Display,
    {
        matrix_to_array(&mut self.buffer, "x", x);
        matrix_to_array(&mut self.buffer, "y", y);
        matrix_to_array(&mut self.buffer, "z", z);
        if self.colors.len() > 0 {
            vector_to_strings(&mut self.buffer, "colors", &self.colors);
        }
        if self.levels.len() > 0 {
            vector_to_array(&mut self.buffer, "levels", &self.levels);
        }
        let opt = self.options_filled();
        write!(&mut self.buffer, "cf=plt.contourf(x,y,z{})\n", &opt).unwrap();
        if !self.no_lines {
            let opt_line = self.options_line();
            write!(&mut self.buffer, "cl=plt.contour(x,y,z{})\n", &opt_line).unwrap();
            if !self.no_labels {
                let opt_label = self.options_label();
                write!(&mut self.buffer, "plt.clabel(cl{})\n", &opt_label).unwrap();
            }
        }
        if !self.no_colorbar {
            let opt_colorbar = self.options_colorbar();
            write!(&mut self.buffer, "cb=plt.colorbar(cf{})\n", &opt_colorbar).unwrap();
            if self.colorbar_label != "" {
                write!(&mut self.buffer, "cb.ax.set_ylabel(r'{}')\n", self.colorbar_label).unwrap();
            }
        }
        if self.with_selected {
            let opt_selected = self.options_selected();
            write!(&mut self.buffer, "plt.contour(x,y,z{})\n", &opt_selected).unwrap();
        }
    }
pub fn draw < ' a , T , U > ( & mut self , x : & ' a T , y : & ' a T , z : & ' a T ) where T : AsMatrix < ' a , U > , U : ' a + std :: fmt :: Display , { matrix_to_array ( & mut self . buffer , " " , x ) ; matrix_to_array ( & mut self . buffer , " " , y ) ; matrix_to_array ( & mut self . buffer , " " , z ) ; if self . colors . len ( ) > 0 { vector_to_strings ( & mut self . buffer , " " , & self . colors ) ; } if self . levels . len ( ) > 0 { vector_to_array ( & mut self . buffer , " " , & self . levels ) ; } let opt = self . options_filled ( ) ; write ! ( mut self buffer " \n " opt ) . unwrap ( ) ; if ! self . no_lines { let opt_line = self . options_line ( ) ; write ! ( mut self buffer " \n " opt_line ) . unwrap ( ) ; if ! self . no_labels { let opt_label = self . options_label ( ) ; write ! ( mut self buffer " \n " opt_label ) . unwrap ( ) ; } } if ! self . no_colorbar { let opt_colorbar = self . options_colorbar ( ) ; write ! ( mut self buffer " \n " opt_colorbar ) . unwrap ( ) ; if self . colorbar_label != " " { write ! ( mut self buffer " \n " self colorbar_label ) . unwrap ( ) ; } } if self . with_selected { let opt_selected = self . options_selected ( ) ; write ! ( mut self buffer " \n " opt_selected ) . unwrap ( ) ; } }
Draws a fancy contour: filled contour with a line contour and a colorbar
Draws a fancy contour : filled contour with a line contour and a colorbar
&mut self
x
&'a T
y
&'a T
z
&'a T
&mut self
x
&'a T
y
&'a T
z
&'a T
input
`x` -- matrix with x values
`y` -- matrix with y values
`z` -- matrix with z values
` x ` -- matrix with x values ` y ` -- matrix with y values ` z ` -- matrix with z values
flags
The following flags control what features are not to be drawn.

`no_lines` -- skip drawing a lines contour on top of the filled contour
`no_labels` -- skip adding labels to the lines contour (if enabled)
`no_colorbar` -- skip drawing a colorbar
`with_selected` -- draw a line contour with a selected level  on top of everything
The following flags control what features are not to be drawn . ` no_lines ` -- skip drawing a lines contour on top of the filled contour ` no_labels ` -- skip adding labels to the lines contour ( if enabled ) ` no_colorbar ` -- skip drawing a colorbar ` with_selected ` -- draw a line contour with a selected level on top of everything
notes
The type `U` of the input matrices must be a number.
The type ` U ` of the input matrices must be a number .