pub struct Boxplot<K, O: BoxplotOrient<K, f32>> { /* private fields */ }
Expand description
The boxplot element
Implementations§
source§impl<K: Clone> Boxplot<K, BoxplotOrientV<K, f32>>
impl<K: Clone> Boxplot<K, BoxplotOrientV<K, f32>>
sourcepub fn new_vertical(key: K, quartiles: &Quartiles) -> Self
pub fn new_vertical(key: K, quartiles: &Quartiles) -> Self
Create a new vertical boxplot element.
key
: The key (the X axis value)quartiles
: The quartiles values for the Y axis- returns The newly created boxplot element
use plotters::prelude::*;
let quartiles = Quartiles::new(&[7, 15, 36, 39, 40, 41]);
let plot = Boxplot::new_vertical("group", &quartiles);
source§impl<K: Clone> Boxplot<K, BoxplotOrientH<K, f32>>
impl<K: Clone> Boxplot<K, BoxplotOrientH<K, f32>>
sourcepub fn new_horizontal(key: K, quartiles: &Quartiles) -> Self
pub fn new_horizontal(key: K, quartiles: &Quartiles) -> Self
Create a new horizontal boxplot element.
key
: The key (the Y axis value)quartiles
: The quartiles values for the X axis- returns The newly created boxplot element
use plotters::prelude::*;
let quartiles = Quartiles::new(&[7, 15, 36, 39, 40, 41]);
let plot = Boxplot::new_horizontal("group", &quartiles);
source§impl<K, O: BoxplotOrient<K, f32>> Boxplot<K, O>
impl<K, O: BoxplotOrient<K, f32>> Boxplot<K, O>
sourcepub fn style<S: Into<ShapeStyle>>(self, style: S) -> Self
pub fn style<S: Into<ShapeStyle>>(self, style: S) -> Self
Set the style of the boxplot.
S
: The required style- returns The up-to-dated boxplot element
use plotters::prelude::*;
let quartiles = Quartiles::new(&[7, 15, 36, 39, 40, 41]);
let plot = Boxplot::new_horizontal("group", &quartiles).style(&BLUE);
sourcepub fn width(self, width: u32) -> Self
pub fn width(self, width: u32) -> Self
Set the bar width.
width
: The required width- returns The up-to-dated boxplot element
use plotters::prelude::*;
let quartiles = Quartiles::new(&[7, 15, 36, 39, 40, 41]);
let plot = Boxplot::new_horizontal("group", &quartiles).width(10);
sourcepub fn whisker_width(self, whisker_width: f64) -> Self
pub fn whisker_width(self, whisker_width: f64) -> Self
Set the width of the whiskers as a fraction of the bar width.
whisker_width
: The required fraction- returns The up-to-dated boxplot element
use plotters::prelude::*;
let quartiles = Quartiles::new(&[7, 15, 36, 39, 40, 41]);
let plot = Boxplot::new_horizontal("group", &quartiles).whisker_width(0.5);
sourcepub fn offset<T: Into<f64> + Copy>(self, offset: T) -> Self
pub fn offset<T: Into<f64> + Copy>(self, offset: T) -> Self
Set the element offset on the key axis.
offset
: The required offset (on the X axis for vertical, on the Y axis for horizontal)- returns The up-to-dated boxplot element
use plotters::prelude::*;
let quartiles = Quartiles::new(&[7, 15, 36, 39, 40, 41]);
let plot = Boxplot::new_horizontal("group", &quartiles).offset(-5);
Trait Implementations§
source§impl<K, DB: DrawingBackend, O: BoxplotOrient<K, f32>> Drawable<DB, BackendCoordOnly> for Boxplot<K, O>
impl<K, DB: DrawingBackend, O: BoxplotOrient<K, f32>> Drawable<DB, BackendCoordOnly> for Boxplot<K, O>
source§impl<'a, K: Clone, O: BoxplotOrient<K, f32>> PointCollection<'a, (<O as BoxplotOrient<K, f32>>::XType, <O as BoxplotOrient<K, f32>>::YType), BackendCoordOnly> for &'a Boxplot<K, O>
impl<'a, K: Clone, O: BoxplotOrient<K, f32>> PointCollection<'a, (<O as BoxplotOrient<K, f32>>::XType, <O as BoxplotOrient<K, f32>>::YType), BackendCoordOnly> for &'a Boxplot<K, O>
§type Point = (<O as BoxplotOrient<K, f32>>::XType, <O as BoxplotOrient<K, f32>>::YType)
type Point = (<O as BoxplotOrient<K, f32>>::XType, <O as BoxplotOrient<K, f32>>::YType)
The item in point iterator
§type IntoIter = Vec<<&'a Boxplot<K, O> as PointCollection<'a, (<O as BoxplotOrient<K, f32>>::XType, <O as BoxplotOrient<K, f32>>::YType), BackendCoordOnly>>::Point, Global>
type IntoIter = Vec<<&'a Boxplot<K, O> as PointCollection<'a, (<O as BoxplotOrient<K, f32>>::XType, <O as BoxplotOrient<K, f32>>::YType), BackendCoordOnly>>::Point, Global>
The point iterator
source§fn point_iter(self) -> Self::IntoIter
fn point_iter(self) -> Self::IntoIter
framework to do the coordinate mapping
Auto Trait Implementations§
impl<K, O> RefUnwindSafe for Boxplot<K, O>where K: RefUnwindSafe, O: RefUnwindSafe,
impl<K, O> Send for Boxplot<K, O>where K: Send, O: Send,
impl<K, O> Sync for Boxplot<K, O>where K: Sync, O: Sync,
impl<K, O> Unpin for Boxplot<K, O>where K: Unpin, O: Unpin,
impl<K, O> UnwindSafe for Boxplot<K, O>where K: UnwindSafe, O: UnwindSafe,
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
source§impl<'b, T, DB, Coord> IntoDynElement<'b, DB, Coord> for Twhere
T: Drawable<DB, BackendCoordOnly> + 'b,
&'a T: for<'a> PointCollection<'a, Coord, BackendCoordOnly>,
Coord: Clone,
DB: DrawingBackend,
impl<'b, T, DB, Coord> IntoDynElement<'b, DB, Coord> for Twhere T: Drawable<DB, BackendCoordOnly> + 'b, &'a T: for<'a> PointCollection<'a, Coord, BackendCoordOnly>, Coord: Clone, DB: DrawingBackend,
source§fn into_dyn(self) -> DynElement<'b, DB, Coord>
fn into_dyn(self) -> DynElement<'b, DB, Coord>
Make the conversion