pub struct HeatmapPlot<'a> { /* private fields */ }Expand description
Builder for heatmap plots with extensive customization options
Implementations§
Source§impl<'a> HeatmapPlot<'a>
impl<'a> HeatmapPlot<'a>
Sourcepub fn new(label: &'a str, values: &'a [f64], rows: usize, cols: usize) -> Self
pub fn new(label: &'a str, values: &'a [f64], rows: usize, cols: usize) -> Self
Create a new heatmap plot with the given label and data
§Arguments
label- The label for the heatmapvalues- The data values in row-major order (unless ColMajor flag is set)rows- Number of rows in the datacols- Number of columns in the data
Sourcepub fn with_scale(self, min: f64, max: f64) -> Self
pub fn with_scale(self, min: f64, max: f64) -> Self
Set the color scale range (min, max) If both are 0.0, auto-scaling will be used
Sourcepub fn with_label_format(self, fmt: Option<&'a str>) -> Self
pub fn with_label_format(self, fmt: Option<&'a str>) -> Self
Set the label format for values (e.g., “%.2f”, “%.1e”) Set to None to disable labels
Sourcepub fn with_bounds(self, min_x: f64, min_y: f64, max_x: f64, max_y: f64) -> Self
pub fn with_bounds(self, min_x: f64, min_y: f64, max_x: f64, max_y: f64) -> Self
Set the drawing area bounds in plot coordinates
Sourcepub fn with_bounds_points(self, min: ImPlotPoint, max: ImPlotPoint) -> Self
pub fn with_bounds_points(self, min: ImPlotPoint, max: ImPlotPoint) -> Self
Set the drawing area bounds using ImPlotPoint
Sourcepub fn with_flags(self, flags: HeatmapFlags) -> Self
pub fn with_flags(self, flags: HeatmapFlags) -> Self
Set heatmap flags for customization
Sourcepub fn column_major(self) -> Self
pub fn column_major(self) -> Self
Use column-major data ordering instead of row-major
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for HeatmapPlot<'a>
impl<'a> RefUnwindSafe for HeatmapPlot<'a>
impl<'a> Send for HeatmapPlot<'a>
impl<'a> Sync for HeatmapPlot<'a>
impl<'a> Unpin for HeatmapPlot<'a>
impl<'a> UnwindSafe for HeatmapPlot<'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