Scatter

Struct Scatter 

Source
pub struct Scatter {
    pub plot: Plot,
}

Fields§

§plot: Plot

Implementations§

Source§

impl Scatter

Source

pub fn new<A: PlotArg>(args: A) -> Scatter

Examples found in repository?
examples/scatter.rs (line 7)
3fn main() {
4    let x = [5.,7.,8.,7.,2.,17.,2.,9.,4.,11.,12.,9.,6.];
5    let y = [99.,86.,87.,88.,111.,86.,70.,87.,94.,78.,77.,85.,86.];
6
7    let mut scat = Scatter::new((x, y));
8    scat.set_desc(Desc {
9        spacing_y: 60.,
10        spacing_x: 60.,
11        ..Default::default()
12    });
13    scat.add(([2., 10.5], [50., 114.], "r-"));
14    scat.show();
15}
Source

pub fn set_title(&mut self, title: &str)

Source

pub fn set_xlabel(&mut self, label: &str)

Source

pub fn set_ylabel(&mut self, label: &str)

Source

pub fn set_desc(&mut self, desc: Desc)

Examples found in repository?
examples/scatter.rs (lines 8-12)
3fn main() {
4    let x = [5.,7.,8.,7.,2.,17.,2.,9.,4.,11.,12.,9.,6.];
5    let y = [99.,86.,87.,88.,111.,86.,70.,87.,94.,78.,77.,85.,86.];
6
7    let mut scat = Scatter::new((x, y));
8    scat.set_desc(Desc {
9        spacing_y: 60.,
10        spacing_x: 60.,
11        ..Default::default()
12    });
13    scat.add(([2., 10.5], [50., 114.], "r-"));
14    scat.show();
15}
Source

pub fn add<A: PlotArg>(&mut self, args: A)

Examples found in repository?
examples/scatter.rs (line 13)
3fn main() {
4    let x = [5.,7.,8.,7.,2.,17.,2.,9.,4.,11.,12.,9.,6.];
5    let y = [99.,86.,87.,88.,111.,86.,70.,87.,94.,78.,77.,85.,86.];
6
7    let mut scat = Scatter::new((x, y));
8    scat.set_desc(Desc {
9        spacing_y: 60.,
10        spacing_x: 60.,
11        ..Default::default()
12    });
13    scat.add(([2., 10.5], [50., 114.], "r-"));
14    scat.show();
15}
Source

pub fn show(self)

Examples found in repository?
examples/scatter.rs (line 14)
3fn main() {
4    let x = [5.,7.,8.,7.,2.,17.,2.,9.,4.,11.,12.,9.,6.];
5    let y = [99.,86.,87.,88.,111.,86.,70.,87.,94.,78.,77.,85.,86.];
6
7    let mut scat = Scatter::new((x, y));
8    scat.set_desc(Desc {
9        spacing_y: 60.,
10        spacing_x: 60.,
11        ..Default::default()
12    });
13    scat.add(([2., 10.5], [50., 114.], "r-"));
14    scat.show();
15}

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.