pub struct BoxStyle { /* private fields */ }
Implementations§
Source§impl BoxStyle
impl BoxStyle
Sourcepub fn new() -> Self
pub fn new() -> Self
Examples found in repository?
More examples
examples/with_grid.rs (line 32)
25fn render_barchart<S>(filename: S)
26where
27 S: AsRef<str>,
28{
29 let b1 = BarChart::new(5.3).label("1");
30 let b2 = BarChart::new(2.6)
31 .label("2")
32 .style(&BoxStyle::new().fill("darkolivegreen"));
33 let mut v = CategoricalView::new().add(b1).add(b2).x_label("Experiment");
34 v.add_grid(Grid::new(3, 8));
35 Page::single(&v)
36 .save(filename.as_ref())
37 .expect("saving svg");
38}
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 overlay(&mut self, other: &Self)
Sourcepub fn fill<T>(self, value: T) -> Self
pub fn fill<T>(self, value: T) -> Self
Examples found in repository?
More examples
examples/with_grid.rs (line 32)
25fn render_barchart<S>(filename: S)
26where
27 S: AsRef<str>,
28{
29 let b1 = BarChart::new(5.3).label("1");
30 let b2 = BarChart::new(2.6)
31 .label("2")
32 .style(&BoxStyle::new().fill("darkolivegreen"));
33 let mut v = CategoricalView::new().add(b1).add(b2).x_label("Experiment");
34 v.add_grid(Grid::new(3, 8));
35 Page::single(&v)
36 .save(filename.as_ref())
37 .expect("saving svg");
38}
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_fill(&self) -> String
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BoxStyle
impl RefUnwindSafe for BoxStyle
impl Send for BoxStyle
impl Sync for BoxStyle
impl Unpin for BoxStyle
impl UnwindSafe for BoxStyle
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