pub struct BoxPlot<'a> { /* private fields */ }
Implementations§
Source§impl<'a> BoxPlot<'a>
impl<'a> BoxPlot<'a>
Sourcepub fn from_slice(v: &'a [f64]) -> Self
pub fn from_slice(v: &'a [f64]) -> Self
Examples found in repository?
examples/boxplot_svg.rs (line 7)
6fn main() {
7 let b1 = BoxPlot::from_slice(&[1.0, 4.0, 2.0, 3.5, 6.4, 2.5, 7.5, 1.8, 9.6]).label("1");
8 let b2 = BoxPlot::from_slice(&[3.0, 4.3, 2.0, 3.5, 6.9, 4.5, 7.5, 1.8, 10.6])
9 .label("2")
10 .style(&BoxStyle::new().fill("darkolivegreen"));
11
12 let v = CategoricalView::new()
13 .add(b1)
14 .add(b2)
15 .x_label("Experiment")
16 .y_label("y");
17
18 Page::single(&v)
19 .dimensions(400, 300)
20 .save("boxplot.svg")
21 .expect("saving svg");
22}
pub fn from_vec(v: Vec<f64>) -> Self
Sourcepub fn style(self, style: &BoxStyle) -> Self
pub fn style(self, style: &BoxStyle) -> Self
Examples found in repository?
examples/boxplot_svg.rs (line 10)
6fn main() {
7 let b1 = BoxPlot::from_slice(&[1.0, 4.0, 2.0, 3.5, 6.4, 2.5, 7.5, 1.8, 9.6]).label("1");
8 let b2 = BoxPlot::from_slice(&[3.0, 4.3, 2.0, 3.5, 6.9, 4.5, 7.5, 1.8, 10.6])
9 .label("2")
10 .style(&BoxStyle::new().fill("darkolivegreen"));
11
12 let v = CategoricalView::new()
13 .add(b1)
14 .add(b2)
15 .x_label("Experiment")
16 .y_label("y");
17
18 Page::single(&v)
19 .dimensions(400, 300)
20 .save("boxplot.svg")
21 .expect("saving svg");
22}
pub fn get_style(&self) -> &BoxStyle
Sourcepub fn label<T>(self, label: T) -> Self
pub fn label<T>(self, label: T) -> Self
Examples found in repository?
examples/boxplot_svg.rs (line 7)
6fn main() {
7 let b1 = BoxPlot::from_slice(&[1.0, 4.0, 2.0, 3.5, 6.4, 2.5, 7.5, 1.8, 9.6]).label("1");
8 let b2 = BoxPlot::from_slice(&[3.0, 4.3, 2.0, 3.5, 6.9, 4.5, 7.5, 1.8, 10.6])
9 .label("2")
10 .style(&BoxStyle::new().fill("darkolivegreen"));
11
12 let v = CategoricalView::new()
13 .add(b1)
14 .add(b2)
15 .x_label("Experiment")
16 .y_label("y");
17
18 Page::single(&v)
19 .dimensions(400, 300)
20 .save("boxplot.svg")
21 .expect("saving svg");
22}
pub fn get_label(&self) -> &String
Trait Implementations§
Source§impl<'a> CategoricalRepresentation for BoxPlot<'a>
impl<'a> CategoricalRepresentation for BoxPlot<'a>
Source§fn ticks(&self) -> Vec<String>
fn ticks(&self) -> Vec<String>
The ticks that this representation covers. Used to collect all ticks for display
fn to_svg( &self, x_axis: &CategoricalAxis, y_axis: &ContinuousAxis, face_width: f64, face_height: f64, ) -> Group
fn to_text( &self, _x_axis: &CategoricalAxis, _y_axis: &ContinuousAxis, _face_width: u32, _face_height: u32, ) -> String
Auto Trait Implementations§
impl<'a> Freeze for BoxPlot<'a>
impl<'a> RefUnwindSafe for BoxPlot<'a>
impl<'a> Send for BoxPlot<'a>
impl<'a> Sync for BoxPlot<'a>
impl<'a> Unpin for BoxPlot<'a>
impl<'a> UnwindSafe for BoxPlot<'a>
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