pub struct HistogramPlot<'a> { /* private fields */ }Expand description
Builder for 1D histogram plots
Implementations§
Source§impl<'a> HistogramPlot<'a>
impl<'a> HistogramPlot<'a>
Sourcepub fn new(label: &'a str, values: &'a [f64]) -> Self
pub fn new(label: &'a str, values: &'a [f64]) -> Self
Create a new histogram plot with the given label and data
Sourcepub fn with_bins(self, bins: i32) -> Self
pub fn with_bins(self, bins: i32) -> Self
Set the number of bins (positive integer) or binning method (negative value) Common binning methods:
- ImPlotBin_Sqrt = -1
- ImPlotBin_Sturges = -2 (default)
- ImPlotBin_Rice = -3
- ImPlotBin_Scott = -4
Sourcepub fn with_bar_scale(self, scale: f64) -> Self
pub fn with_bar_scale(self, scale: f64) -> Self
Set the bar scale factor
Sourcepub fn with_range(self, min: f64, max: f64) -> Self
pub fn with_range(self, min: f64, max: f64) -> Self
Set the data range for binning Values outside this range will be treated as outliers
Sourcepub fn with_range_struct(self, range: ImPlotRange) -> Self
pub fn with_range_struct(self, range: ImPlotRange) -> Self
Set the data range using ImPlotRange
Sourcepub fn with_flags(self, flags: HistogramFlags) -> Self
pub fn with_flags(self, flags: HistogramFlags) -> Self
Set histogram flags for customization
Sourcepub fn horizontal(self) -> Self
pub fn horizontal(self) -> Self
Make the histogram horizontal instead of vertical
Sourcepub fn cumulative(self) -> Self
pub fn cumulative(self) -> Self
Make the histogram cumulative
Sourcepub fn no_outliers(self) -> Self
pub fn no_outliers(self) -> Self
Exclude outliers from normalization
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for HistogramPlot<'a>
impl<'a> RefUnwindSafe for HistogramPlot<'a>
impl<'a> Send for HistogramPlot<'a>
impl<'a> Sync for HistogramPlot<'a>
impl<'a> Unpin for HistogramPlot<'a>
impl<'a> UnwindSafe for HistogramPlot<'a>
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