pub struct Scatter {
pub plot: Plot,
}
Fields§
§plot: Plot
Implementations§
source§impl Scatter
impl Scatter
sourcepub fn new<A: PlotArg>(args: A) -> Scatter
pub fn new<A: PlotArg>(args: A) -> Scatter
Examples found in repository?
examples/scatter.rs (line 7)
3 4 5 6 7 8 9 10 11 12 13 14 15
fn main() {
let x = [5.,7.,8.,7.,2.,17.,2.,9.,4.,11.,12.,9.,6.];
let y = [99.,86.,87.,88.,111.,86.,70.,87.,94.,78.,77.,85.,86.];
let mut scat = Scatter::new((x, y));
scat.set_desc(Desc {
spacing_y: 60.,
spacing_x: 60.,
..Default::default()
});
scat.add(([2., 10.5], [50., 114.], "r-"));
scat.show();
}
pub fn set_title(&mut self, title: &str)
pub fn set_xlabel(&mut self, label: &str)
pub fn set_ylabel(&mut self, label: &str)
sourcepub fn set_desc(&mut self, desc: Desc)
pub fn set_desc(&mut self, desc: Desc)
Examples found in repository?
examples/scatter.rs (lines 8-12)
3 4 5 6 7 8 9 10 11 12 13 14 15
fn main() {
let x = [5.,7.,8.,7.,2.,17.,2.,9.,4.,11.,12.,9.,6.];
let y = [99.,86.,87.,88.,111.,86.,70.,87.,94.,78.,77.,85.,86.];
let mut scat = Scatter::new((x, y));
scat.set_desc(Desc {
spacing_y: 60.,
spacing_x: 60.,
..Default::default()
});
scat.add(([2., 10.5], [50., 114.], "r-"));
scat.show();
}
sourcepub fn add<A: PlotArg>(&mut self, args: A)
pub fn add<A: PlotArg>(&mut self, args: A)
Examples found in repository?
examples/scatter.rs (line 13)
3 4 5 6 7 8 9 10 11 12 13 14 15
fn main() {
let x = [5.,7.,8.,7.,2.,17.,2.,9.,4.,11.,12.,9.,6.];
let y = [99.,86.,87.,88.,111.,86.,70.,87.,94.,78.,77.,85.,86.];
let mut scat = Scatter::new((x, y));
scat.set_desc(Desc {
spacing_y: 60.,
spacing_x: 60.,
..Default::default()
});
scat.add(([2., 10.5], [50., 114.], "r-"));
scat.show();
}
sourcepub fn show(self)
pub fn show(self)
Examples found in repository?
examples/scatter.rs (line 14)
3 4 5 6 7 8 9 10 11 12 13 14 15
fn main() {
let x = [5.,7.,8.,7.,2.,17.,2.,9.,4.,11.,12.,9.,6.];
let y = [99.,86.,87.,88.,111.,86.,70.,87.,94.,78.,77.,85.,86.];
let mut scat = Scatter::new((x, y));
scat.set_desc(Desc {
spacing_y: 60.,
spacing_x: 60.,
..Default::default()
});
scat.add(([2., 10.5], [50., 114.], "r-"));
scat.show();
}