pub struct Heatmap { /* private fields */ }Expand description
A grid of color-mapped cells.
Implementations§
Source§impl Heatmap
impl Heatmap
Sourcepub fn new(values: &[Vec<f64>]) -> Self
pub fn new(values: &[Vec<f64>]) -> Self
Build from a row-major matrix (values[row][col]). Rows may not be empty
and must all be the same width; otherwise the shorter rows are padded
with NaN (rendered as the “missing” color). The default normalization
is linear over the finite value range.
Sourcepub fn colormap(self, colormap: GradientColorMap) -> Self
pub fn colormap(self, colormap: GradientColorMap) -> Self
Set the color map.
Sourcepub fn normalization(self, norm: Normalization) -> Self
pub fn normalization(self, norm: Normalization) -> Self
Set the value→[0,1] normalization.
Sourcepub fn annotate(self, annotation: HeatmapAnnotation) -> Self
pub fn annotate(self, annotation: HeatmapAnnotation) -> Self
Annotate each cell with its value.
Sourcepub fn cell_border(self, style: ShapeStyle) -> Self
pub fn cell_border(self, style: ShapeStyle) -> Self
Draw a border around each cell.
Trait Implementations§
Source§impl<DB: DrawingBackend> Drawable<DB> for Heatmap
impl<DB: DrawingBackend> Drawable<DB> for Heatmap
Auto Trait Implementations§
impl Freeze for Heatmap
impl RefUnwindSafe for Heatmap
impl Send for Heatmap
impl Sync for Heatmap
impl Unpin for Heatmap
impl UnsafeUnpin for Heatmap
impl UnwindSafe for Heatmap
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<'b, T, DB, Coord> IntoDynElement<'b, DB, Coord> for Twhere
T: Drawable<DB> + 'b,
&'a T: for<'a> PointCollection<'a, Coord>,
Coord: Clone,
DB: DrawingBackend,
impl<'b, T, DB, Coord> IntoDynElement<'b, DB, Coord> for Twhere
T: Drawable<DB> + 'b,
&'a T: for<'a> PointCollection<'a, Coord>,
Coord: Clone,
DB: DrawingBackend,
Source§fn into_dyn(self) -> DynElement<'b, DB, Coord>
fn into_dyn(self) -> DynElement<'b, DB, Coord>
Make the conversion