Struct Boxplot
pub struct Boxplot<K, O>where
O: BoxplotOrient<K, f32>,{ /* private fields */ }Expand description
The boxplot element
Implementations§
§impl<K> Boxplot<K, BoxplotOrientV<K, f32>>where
K: Clone,
impl<K> Boxplot<K, BoxplotOrientV<K, f32>>where
K: Clone,
pub fn new_vertical(
key: K,
quartiles: &Quartiles,
) -> Boxplot<K, BoxplotOrientV<K, f32>>
pub fn new_vertical( key: K, quartiles: &Quartiles, ) -> Boxplot<K, BoxplotOrientV<K, f32>>
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);§impl<K> Boxplot<K, BoxplotOrientH<K, f32>>where
K: Clone,
impl<K> Boxplot<K, BoxplotOrientH<K, f32>>where
K: Clone,
pub fn new_horizontal(
key: K,
quartiles: &Quartiles,
) -> Boxplot<K, BoxplotOrientH<K, f32>>
pub fn new_horizontal( key: K, quartiles: &Quartiles, ) -> Boxplot<K, BoxplotOrientH<K, f32>>
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);§impl<K, O> Boxplot<K, O>where
O: BoxplotOrient<K, f32>,
impl<K, O> Boxplot<K, O>where
O: BoxplotOrient<K, f32>,
pub fn style<S>(self, style: S) -> Boxplot<K, O>where
S: Into<ShapeStyle>,
pub fn style<S>(self, style: S) -> Boxplot<K, O>where
S: Into<ShapeStyle>,
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);pub fn width(self, width: u32) -> Boxplot<K, O>
pub fn width(self, width: u32) -> Boxplot<K, O>
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);pub fn whisker_width(self, whisker_width: f64) -> Boxplot<K, O>
pub fn whisker_width(self, whisker_width: f64) -> Boxplot<K, O>
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);pub fn offset<T>(self, offset: T) -> Boxplot<K, O>
pub fn offset<T>(self, offset: T) -> Boxplot<K, O>
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§
§impl<K, DB, O> Drawable<DB> for Boxplot<K, O>where
DB: DrawingBackend,
O: BoxplotOrient<K, f32>,
impl<K, DB, O> Drawable<DB> for Boxplot<K, O>where
DB: DrawingBackend,
O: BoxplotOrient<K, f32>,
§impl<'a, K, O> PointCollection<'a, (<O as BoxplotOrient<K, f32>>::XType, <O as BoxplotOrient<K, f32>>::YType)> for &'a Boxplot<K, O>
impl<'a, K, O> PointCollection<'a, (<O as BoxplotOrient<K, f32>>::XType, <O as BoxplotOrient<K, f32>>::YType)> 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)>>::Point>
type IntoIter = Vec<<&'a Boxplot<K, O> as PointCollection<'a, (<O as BoxplotOrient<K, f32>>::XType, <O as BoxplotOrient<K, f32>>::YType)>>::Point>
The point iterator
§fn point_iter(
self,
) -> <&'a Boxplot<K, O> as PointCollection<'a, (<O as BoxplotOrient<K, f32>>::XType, <O as BoxplotOrient<K, f32>>::YType)>>::IntoIter
fn point_iter( self, ) -> <&'a Boxplot<K, O> as PointCollection<'a, (<O as BoxplotOrient<K, f32>>::XType, <O as BoxplotOrient<K, f32>>::YType)>>::IntoIter
framework to do the coordinate mapping
Auto Trait Implementations§
impl<K, O> Freeze for Boxplot<K, O>where
K: Freeze,
impl<K, O> RefUnwindSafe for Boxplot<K, O>where
K: RefUnwindSafe,
O: RefUnwindSafe,
impl<K, O> Send for Boxplot<K, O>
impl<K, O> Sync for Boxplot<K, O>
impl<K, O> Unpin for Boxplot<K, O>
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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<'b, T, DB, Coord> IntoDynElement<'b, DB, Coord> for Twhere
T: Drawable<DB> + 'b,
&'a T: for<'a> PointCollection<'a, Coord>,
Coord: Clone,
DB: DrawingBackend,
impl<'b, T, DB, Coord> IntoDynElement<'b, DB, Coord> for Twhere
T: Drawable<DB> + 'b,
&'a T: for<'a> PointCollection<'a, Coord>,
Coord: Clone,
DB: DrawingBackend,
§fn into_dyn(self) -> DynElement<'b, DB, Coord>
fn into_dyn(self) -> DynElement<'b, DB, Coord>
Make the conversion
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more