pub enum HistogramData {
RawValues(Vec<f32>),
PreBinned {
bin_edges: Vec<f32>,
counts: Vec<f32>,
},
Overlaid(Vec<HistogramSeries>),
}Expand description
Histogram data - either raw values, pre-binned, or overlaid series.
Variants§
RawValues(Vec<f32>)
Raw values to bin; binning is done at render time
PreBinned
Pre-binned: bin_edges has length N+1, counts has length N (one per bin)
Overlaid(Vec<HistogramSeries>)
Multiple series for overlaid histograms; each (values, gate_id) is one series
Implementations§
Source§impl HistogramData
impl HistogramData
Sourcepub fn from_values(values: Vec<f32>) -> Self
pub fn from_values(values: Vec<f32>) -> Self
Create from raw values (will be binned at render time)
Sourcepub fn pre_binned(
bin_edges: Vec<f32>,
counts: Vec<f32>,
) -> Result<Self, HistogramDataError>
pub fn pre_binned( bin_edges: Vec<f32>, counts: Vec<f32>, ) -> Result<Self, HistogramDataError>
Create from pre-binned data. bin_edges.len() must equal counts.len() + 1.
§Errors
Returns Err if lengths are inconsistent.
Sourcepub fn overlaid(series: Vec<(Vec<f32>, u32)>) -> Self
pub fn overlaid(series: Vec<(Vec<f32>, u32)>) -> Self
Create overlaid histogram data (multiple series, each with gate_id for color)
Sourcepub fn is_overlaid(&self) -> bool
pub fn is_overlaid(&self) -> bool
Whether this is overlaid (multiple series)
Trait Implementations§
Source§impl Clone for HistogramData
impl Clone for HistogramData
Source§fn clone(&self) -> HistogramData
fn clone(&self) -> HistogramData
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for HistogramData
impl RefUnwindSafe for HistogramData
impl Send for HistogramData
impl Sync for HistogramData
impl Unpin for HistogramData
impl UnsafeUnpin for HistogramData
impl UnwindSafe for HistogramData
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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