pub struct HistogramPlot;Expand description
Histogram plot implementation
Creates 1D histograms with x-axis = values, y-axis = count/frequency. Supports raw values (auto-binned), pre-binned data, and overlaid series.
§Example
use flow_plots::plots::histogram::HistogramPlot;
use flow_plots::plots::traits::Plot;
use flow_plots::options::{BasePlotOptions, HistogramPlotOptions};
use flow_plots::histogram_data::HistogramData;
use flow_plots::render::RenderConfig;
let plot = HistogramPlot::new();
let options = HistogramPlotOptions::new()
.base(BasePlotOptions::new().width(800u32).height(600u32).build()?)
.histogram_filled(true)
.build()?;
let data = HistogramData::from_values(vec![1.0, 2.0, 2.0, 3.0, 3.0, 3.0]);
let mut render_config = RenderConfig::default();
let bytes = plot.render(data, &options, &mut render_config)?;Implementations§
Source§impl HistogramPlot
impl HistogramPlot
Trait Implementations§
Source§impl Plot for HistogramPlot
impl Plot for HistogramPlot
Source§type Options = HistogramPlotOptions
type Options = HistogramPlotOptions
The options type for this plot
Source§type Data = HistogramData
type Data = HistogramData
The data type this plot accepts
Auto Trait Implementations§
impl Freeze for HistogramPlot
impl RefUnwindSafe for HistogramPlot
impl Send for HistogramPlot
impl Sync for HistogramPlot
impl Unpin for HistogramPlot
impl UnsafeUnpin for HistogramPlot
impl UnwindSafe for HistogramPlot
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> 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