Struct PlotHeatmap

Source
pub struct PlotHeatmap { /* private fields */ }
Expand description

Struct to provide functionality for creating headmaps.

Implementations§

Source§

impl PlotHeatmap

Source

pub fn new(label: &str) -> Self

Create a new heatmap to be shown. Uses the same defaults as the C++ version (see code for what those are), aside from the scale_min and scale_max values, which default to None, which is interpreted as “automatically make the scale fit the data”. Does not draw anything yet.

Source

pub fn with_scale(self, scale_min: f64, scale_max: f64) -> Self

Specify the scale for the shown colors by minimum and maximum value.

Source

pub fn with_label_format(self, label_format: Option<&str>) -> Self

Specify the label format for hovered data points.. None means no label is shown.

Source

pub fn with_drawing_area( self, lower_left: ImPlotPoint, upper_right: ImPlotPoint, ) -> Self

Specify the drawing area as the lower left and upper right point

Source

pub fn plot(&self, values: &[f64], number_of_rows: u32, number_of_cols: u32)

Plot the heatmap, with the given values (assumed to be in row-major order), number of rows and number of columns.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.