pub fn save<P>(&self, path: P) -> Result<()>
    where
        P: AsRef<Path>,
    {
        match path.as_ref().extension().and_then(OsStr::to_str) {
            Some("svg") => match svg::save(path, &self.to_svg()?) {
                    Ok(ok) => Ok(ok),
                    Err(error) => Err(errors::Error::FailedToSave(error))
                }
            _ => Ok(()),
        }
    }
/**
    Save the plot to a file.

    The type of file will be based on the file extension.
    */
Save the plot to a file.
The type of file will be based on the file extension.
Save the plot to a file . The type of file will be based on the file extension .
pub fn save<P>(&self, path: P) -> Result<()>
    where
        P: AsRef<Path>,
    {
        match path.as_ref().extension().and_then(OsStr::to_str) {
            Some("svg") => match svg::save(path, &self.to_svg()?) {
                    Ok(ok) => Ok(ok),
                    Err(error) => Err(errors::Error::FailedToSave(error))
                }
            _ => Ok(()),
        }
    }
pub fn save < P > ( & self , path : P ) -> Result < ( ) > where P : AsRef < Path > , { match path . as_ref ( ) . extension ( ) . and_then ( OsStr :: to_str ) { Some ( " " ) => match svg :: save ( path , & self . to_svg ( ) ? ) { Ok ( ok ) => Ok ( ok ) , Err ( error ) => Err ( errors :: Error :: FailedToSave ( error ) ) } _ => Ok ( ( ) ) , } }
Save the plot to a file.
Save the plot to a file .
&self
path
P
&self
path
P