pub struct DensityPlot;Expand description
Density plot implementation
Creates a 2D density plot from (x, y) coordinate pairs by binning data points into pixels and coloring by density.
§Example
use flow_plots::plots::density::DensityPlot;
use flow_plots::options::DensityPlotOptions;
use flow_plots::render::RenderConfig;
let plot = DensityPlot::new();
let options = DensityPlotOptions::new()
.width(800)
.height(600)
.build()?;
let data: Vec<(f32, f32)> = vec![(100.0, 200.0), (150.0, 250.0)];
let mut render_config = RenderConfig::default();
let bytes = plot.render(data, &options, &mut render_config)?;Implementations§
Source§impl DensityPlot
impl DensityPlot
Trait Implementations§
Source§impl Plot for DensityPlot
impl Plot for DensityPlot
Source§type Options = DensityPlotOptions
type Options = DensityPlotOptions
The options type for this plot
Auto Trait Implementations§
impl Freeze for DensityPlot
impl RefUnwindSafe for DensityPlot
impl Send for DensityPlot
impl Sync for DensityPlot
impl Unpin for DensityPlot
impl UnwindSafe for DensityPlot
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> 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