pub struct HeatmapPlot<'a, F = &'static str> { /* 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
Source§impl<'a, F: AsRef<str>> HeatmapPlot<'a, F>
impl<'a, F: AsRef<str>> HeatmapPlot<'a, F>
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<'fmt>(
self,
format: FloatFormat<'fmt>,
) -> HeatmapPlot<'a, FloatFormat<'fmt>>
pub fn with_label_format<'fmt>( self, format: FloatFormat<'fmt>, ) -> HeatmapPlot<'a, FloatFormat<'fmt>>
Set the validated label format for values.
Sourcepub fn try_label_format<'fmt>(
self,
format: impl Into<Cow<'fmt, str>>,
) -> Result<HeatmapPlot<'a, FloatFormat<'fmt>>, FloatFormatError>
pub fn try_label_format<'fmt>( self, format: impl Into<Cow<'fmt, str>>, ) -> Result<HeatmapPlot<'a, FloatFormat<'fmt>>, FloatFormatError>
Validate and set a C-style label format for values.
Sourcepub fn without_value_labels(self) -> Self
pub fn without_value_labels(self) -> Self
Disable value 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 with_item_flags(self, flags: ItemFlags) -> Self
pub fn with_item_flags(self, flags: ItemFlags) -> Self
Set common item flags for this plot item (applies to all plot types)
Sourcepub fn column_major(self) -> Self
pub fn column_major(self) -> Self
Use column-major data ordering instead of row-major
Trait Implementations§
Source§impl<F> PlotItemStyled for HeatmapPlot<'_, F>
impl<F> PlotItemStyled for HeatmapPlot<'_, F>
fn style_mut(&mut self) -> &mut PlotItemStyle
Source§fn with_style(self, style: PlotItemStyle) -> Self
fn with_style(self, style: PlotItemStyle) -> Self
Replace the entire item style override for this plot.
Source§fn with_line_color(self, color: [f32; 4]) -> Self
fn with_line_color(self, color: [f32; 4]) -> Self
Set the line color. Use the alpha channel to control line transparency.
Source§fn with_line_weight(self, weight: f32) -> Self
fn with_line_weight(self, weight: f32) -> Self
Set the line width in pixels.
Source§fn with_fill_color(self, color: [f32; 4]) -> Self
fn with_fill_color(self, color: [f32; 4]) -> Self
Set the fill color.
Source§fn with_fill_alpha(self, alpha: f32) -> Self
fn with_fill_alpha(self, alpha: f32) -> Self
Set the fill alpha multiplier used for fills and marker faces.
Source§fn with_marker(self, marker: Marker) -> Self
fn with_marker(self, marker: Marker) -> Self
Set the marker type.
Source§fn with_marker_size(self, size: f32) -> Self
fn with_marker_size(self, size: f32) -> Self
Set the marker size in pixels.
Source§fn with_marker_line_color(self, color: [f32; 4]) -> Self
fn with_marker_line_color(self, color: [f32; 4]) -> Self
Set the marker outline color.
Source§fn with_marker_fill_color(self, color: [f32; 4]) -> Self
fn with_marker_fill_color(self, color: [f32; 4]) -> Self
Set the marker fill color.
Auto Trait Implementations§
impl<'a, F> Freeze for HeatmapPlot<'a, F>where
F: Freeze,
impl<'a, F> RefUnwindSafe for HeatmapPlot<'a, F>where
F: RefUnwindSafe,
impl<'a, F> Send for HeatmapPlot<'a, F>where
F: Send,
impl<'a, F> Sync for HeatmapPlot<'a, F>where
F: Sync,
impl<'a, F> Unpin for HeatmapPlot<'a, F>where
F: Unpin,
impl<'a, F> UnsafeUnpin for HeatmapPlot<'a, F>where
F: UnsafeUnpin,
impl<'a, F> UnwindSafe for HeatmapPlot<'a, F>where
F: UnwindSafe,
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