[][src]Struct plotters::series::Histogram

pub struct Histogram<'a, BR, A, Tag = Vertical> where
    BR: DiscreteRanged,
    BR::ValueType: Eq + Hash,
    A: AddAssign<A> + Default,
    Tag: HistogramType, 
{ /* fields omitted */ }

The series that aggregate data into a histogram

Methods

impl<'a, BR, A, Tag> Histogram<'a, BR, A, Tag> where
    BR: DiscreteRanged,
    BR::ValueType: Eq + Hash,
    A: AddAssign<A> + Default + 'a,
    Tag: HistogramType, 
[src]

pub fn style<S: Into<ShapeStyle>>(self, style: S) -> Self[src]

Set the style of the histogram

pub fn style_func(
    self,
    style_func: impl Fn(&BR::ValueType, &A) -> ShapeStyle + 'a
) -> Self
[src]

Set the style of histogram using a lambda function

pub fn baseline(self, baseline: A) -> Self where
    A: Clone
[src]

Set the baseline of the histogram

pub fn baseline_func(self, func: impl Fn(BR::ValueType) -> A + 'a) -> Self[src]

Set a function that defines variant baseline

pub fn margin(self, value: u32) -> Self[src]

Set the margin for each bar

pub fn data<I: IntoIterator<Item = (BR::ValueType, A)>>(self, iter: I) -> Self[src]

Set the data iterator

impl<'a, BR, A> Histogram<'a, BR, A, Vertical> where
    BR: DiscreteRanged,
    BR::ValueType: Eq + Hash,
    A: AddAssign<A> + Default + 'a, 
[src]

pub fn new<S: Into<ShapeStyle>, I: IntoIterator<Item = (BR::ValueType, A)>>(
    iter: I,
    margin: u32,
    style: S
) -> Self where
    BR::RangeParameter: UseDefaultParameter, 
[src]

Create a new histogram series.

  • iter: The data iterator
  • margin: The margin between bars
  • style: The style of bars

Returns the newly created histogram series

pub fn vertical<ACoord, DB: DrawingBackend + 'a>(
    parent: &ChartContext<DB, RangedCoord<BR, ACoord>>
) -> Self where
    ACoord: Ranged<ValueType = A>, 
[src]

impl<'a, BR, A> Histogram<'a, BR, A, Horizontal> where
    BR: DiscreteRanged,
    BR::ValueType: Eq + Hash,
    A: AddAssign<A> + Default + 'a, 
[src]

pub fn horizontal<ACoord, DB: DrawingBackend>(
    parent: &ChartContext<DB, RangedCoord<ACoord, BR>>
) -> Self where
    ACoord: Ranged<ValueType = A>, 
[src]

Trait Implementations

impl<'a, BR, A> Iterator for Histogram<'a, BR, A, Vertical> where
    BR: DiscreteRanged,
    BR::ValueType: Eq + Hash,
    A: AddAssign<A> + Default
[src]

type Item = Rectangle<(BR::ValueType, A)>

The type of the elements being iterated over.

impl<'a, BR, A> Iterator for Histogram<'a, BR, A, Horizontal> where
    BR: DiscreteRanged,
    BR::ValueType: Eq + Hash,
    A: AddAssign<A> + Default
[src]

type Item = Rectangle<(A, BR::ValueType)>

The type of the elements being iterated over.

Auto Trait Implementations

impl<'a, BR, A, Tag = Vertical> !Send for Histogram<'a, BR, A, Tag>

impl<'a, BR, A, Tag> Unpin for Histogram<'a, BR, A, Tag> where
    A: Unpin,
    BR: Unpin,
    Tag: Unpin,
    <BR as DiscreteRanged>::RangeParameter: Unpin,
    <BR as Ranged>::ValueType: Unpin

impl<'a, BR, A, Tag = Vertical> !Sync for Histogram<'a, BR, A, Tag>

impl<'a, BR, A, Tag = Vertical> !UnwindSafe for Histogram<'a, BR, A, Tag>

impl<'a, BR, A, Tag = Vertical> !RefUnwindSafe for Histogram<'a, BR, A, Tag>

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<I> IntoIterator for I where
    I: Iterator
[src]

type Item = <I as Iterator>::Item

The type of the elements being iterated over.

type IntoIter = I

Which kind of iterator are we turning this into?

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> SetParameter for T

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
    D: AdaptFrom<S, Swp, Dwp, T>,
    Dwp: WhitePoint,
    Swp: WhitePoint,
    T: Component + Float
[src]

impl<T, U> ConvertInto<U> for T where
    U: ConvertFrom<T>, 
[src]

impl<Iter> PathIterator for Iter where
    Iter: Iterator<Item = PathEvent>, 

impl<Iter> FlattenedIterator for Iter where
    Iter: Iterator<Item = FlattenedEvent>, 

impl<Iter> QuadraticPathIterator for Iter where
    Iter: Iterator<Item = QuadraticEvent>,