pub struct Scatter {
pub plot: Plot,
}Fields§
§plot: PlotImplementations§
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)
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}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)
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}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)
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}Sourcepub fn show(self)
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§
impl Freeze for Scatter
impl RefUnwindSafe for Scatter
impl Send for Scatter
impl Sync for Scatter
impl Unpin for Scatter
impl UnwindSafe for Scatter
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more