Struct HeatMap

Source
pub struct HeatMap<X, Y, Z>
where X: Serialize + Clone, Y: Serialize + Clone, Z: Serialize + Clone,
{ /* private fields */ }
Expand description

Construct a heat map trace.

§Examples

use plotly::HeatMap;

let trace = HeatMap::new(
    vec![0.0, 1.0],
    vec![2.0, 3.0],
    vec![vec![0.25, 0.75], vec![0.0, 0.5]]
);

let expected = serde_json::json!({
    "type": "heatmap",
    "x": [0.0, 1.0],
    "y": [2.0, 3.0],
    "z": [[0.25, 0.75], [0.0, 0.5]]
});

assert_eq!(serde_json::to_value(trace).unwrap(), expected);

Implementations§

Source§

impl<X, Y, Z> HeatMap<X, Y, Z>
where X: Serialize + Clone, Y: Serialize + Clone, Z: Serialize + Clone,

Source

pub fn auto_color_scale(self, value: bool) -> Box<Self>

Source

pub fn modify_all_auto_color_scale(value: bool) -> RestyleHeatMap<X, Y, Z>

Apply the same restyling to all the traces

Source

pub fn modify_auto_color_scale(values: Vec<bool>) -> RestyleHeatMap<X, Y, Z>

Apply the restyling individually to each trace. Caller is responsible to set the length of the vector to be equal to the number of traces

Source

pub fn color_bar(self, value: ColorBar) -> Box<Self>

Source

pub fn modify_all_color_bar(value: ColorBar) -> RestyleHeatMap<X, Y, Z>

Apply the same restyling to all the traces

Source

pub fn modify_color_bar(values: Vec<ColorBar>) -> RestyleHeatMap<X, Y, Z>

Apply the restyling individually to each trace. Caller is responsible to set the length of the vector to be equal to the number of traces

Source

pub fn color_scale(self, value: ColorScale) -> Box<Self>

Source

pub fn modify_all_color_scale(value: ColorScale) -> RestyleHeatMap<X, Y, Z>

Apply the same restyling to all the traces

Source

pub fn modify_color_scale(values: Vec<ColorScale>) -> RestyleHeatMap<X, Y, Z>

Apply the restyling individually to each trace. Caller is responsible to set the length of the vector to be equal to the number of traces

Source

pub fn connect_gaps(self, value: bool) -> Box<Self>

Source

pub fn modify_all_connect_gaps(value: bool) -> RestyleHeatMap<X, Y, Z>

Apply the same restyling to all the traces

Source

pub fn modify_connect_gaps(values: Vec<bool>) -> RestyleHeatMap<X, Y, Z>

Apply the restyling individually to each trace. Caller is responsible to set the length of the vector to be equal to the number of traces

Source

pub fn custom_data( self, value: Vec<impl Into<NumOrString> + Clone>, ) -> Box<Self>

Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements

Source

pub fn modify_all_custom_data( value: Vec<impl Into<NumOrString> + Clone>, ) -> RestyleHeatMap<X, Y, Z>

Apply the same restyling to all the traces

Source

pub fn modify_custom_data( values: Vec<Vec<impl Into<NumOrString> + Clone>>, ) -> RestyleHeatMap<X, Y, Z>

Apply the restyling individually to each trace. Caller is responsible to set the length of the vector to be equal to the number of traces

Source

pub fn hover_info(self, value: HoverInfo) -> Box<Self>

Source

pub fn modify_all_hover_info(value: HoverInfo) -> RestyleHeatMap<X, Y, Z>

Apply the same restyling to all the traces

Source

pub fn modify_hover_info(values: Vec<HoverInfo>) -> RestyleHeatMap<X, Y, Z>

Apply the restyling individually to each trace. Caller is responsible to set the length of the vector to be equal to the number of traces

Source

pub fn hover_label(self, value: Label) -> Box<Self>

Source

pub fn modify_all_hover_label(value: Label) -> RestyleHeatMap<X, Y, Z>

Apply the same restyling to all the traces

Source

pub fn modify_hover_label(values: Vec<Label>) -> RestyleHeatMap<X, Y, Z>

Apply the restyling individually to each trace. Caller is responsible to set the length of the vector to be equal to the number of traces

Source

pub fn hover_on_gaps(self, value: bool) -> Box<Self>

Source

pub fn modify_all_hover_on_gaps(value: bool) -> RestyleHeatMap<X, Y, Z>

Apply the same restyling to all the traces

Source

pub fn modify_hover_on_gaps(values: Vec<bool>) -> RestyleHeatMap<X, Y, Z>

Apply the restyling individually to each trace. Caller is responsible to set the length of the vector to be equal to the number of traces

Source

pub fn hover_template(self, value: impl AsRef<str>) -> Box<Self>

Source

pub fn modify_all_hover_template( value: impl AsRef<str>, ) -> RestyleHeatMap<X, Y, Z>

Apply the same restyling to all the traces

Source

pub fn modify_hover_template( values: Vec<impl AsRef<str>>, ) -> RestyleHeatMap<X, Y, Z>

Apply the restyling individually to each trace. Caller is responsible to set the length of the vector to be equal to the number of traces

Source

pub fn hover_template_array(self, value: Vec<impl AsRef<str>>) -> Box<Self>

Source

pub fn hover_text(self, value: Vec<impl AsRef<str>>) -> Box<Self>

Source

pub fn modify_all_hover_text( value: Vec<impl AsRef<str>>, ) -> RestyleHeatMap<X, Y, Z>

Apply the same restyling to all the traces

Source

pub fn modify_hover_text( values: Vec<Vec<impl AsRef<str>>>, ) -> RestyleHeatMap<X, Y, Z>

Apply the restyling individually to each trace. Caller is responsible to set the length of the vector to be equal to the number of traces

Source

pub fn legend_group(self, value: impl AsRef<str>) -> Box<Self>

Source

pub fn modify_all_legend_group( value: impl AsRef<str>, ) -> RestyleHeatMap<X, Y, Z>

Apply the same restyling to all the traces

Source

pub fn modify_legend_group( values: Vec<impl AsRef<str>>, ) -> RestyleHeatMap<X, Y, Z>

Apply the restyling individually to each trace. Caller is responsible to set the length of the vector to be equal to the number of traces

Source

pub fn legend_group_title(self, value: impl Into<LegendGroupTitle>) -> Box<Self>

Source

pub fn modify_all_legend_group_title( value: impl Into<LegendGroupTitle>, ) -> RestyleHeatMap<X, Y, Z>

Apply the same restyling to all the traces

Source

pub fn modify_legend_group_title( values: Vec<impl Into<LegendGroupTitle>>, ) -> RestyleHeatMap<X, Y, Z>

Apply the restyling individually to each trace. Caller is responsible to set the length of the vector to be equal to the number of traces

Source

pub fn name(self, value: impl AsRef<str>) -> Box<Self>

Source

pub fn modify_all_name(value: impl AsRef<str>) -> RestyleHeatMap<X, Y, Z>

Apply the same restyling to all the traces

Source

pub fn modify_name(values: Vec<impl AsRef<str>>) -> RestyleHeatMap<X, Y, Z>

Apply the restyling individually to each trace. Caller is responsible to set the length of the vector to be equal to the number of traces

Source

pub fn opacity(self, value: f64) -> Box<Self>

Source

pub fn modify_all_opacity(value: f64) -> RestyleHeatMap<X, Y, Z>

Apply the same restyling to all the traces

Source

pub fn modify_opacity(values: Vec<f64>) -> RestyleHeatMap<X, Y, Z>

Apply the restyling individually to each trace. Caller is responsible to set the length of the vector to be equal to the number of traces

Source

pub fn reverse_scale(self, value: bool) -> Box<Self>

Source

pub fn modify_all_reverse_scale(value: bool) -> RestyleHeatMap<X, Y, Z>

Apply the same restyling to all the traces

Source

pub fn modify_reverse_scale(values: Vec<bool>) -> RestyleHeatMap<X, Y, Z>

Apply the restyling individually to each trace. Caller is responsible to set the length of the vector to be equal to the number of traces

Source

pub fn show_legend(self, value: bool) -> Box<Self>

Source

pub fn modify_all_show_legend(value: bool) -> RestyleHeatMap<X, Y, Z>

Apply the same restyling to all the traces

Source

pub fn modify_show_legend(values: Vec<bool>) -> RestyleHeatMap<X, Y, Z>

Apply the restyling individually to each trace. Caller is responsible to set the length of the vector to be equal to the number of traces

Source

pub fn show_scale(self, value: bool) -> Box<Self>

Source

pub fn modify_all_show_scale(value: bool) -> RestyleHeatMap<X, Y, Z>

Apply the same restyling to all the traces

Source

pub fn modify_show_scale(values: Vec<bool>) -> RestyleHeatMap<X, Y, Z>

Apply the restyling individually to each trace. Caller is responsible to set the length of the vector to be equal to the number of traces

Source

pub fn text(self, value: Vec<impl AsRef<str>>) -> Box<Self>

Source

pub fn modify_all_text(value: Vec<impl AsRef<str>>) -> RestyleHeatMap<X, Y, Z>

Apply the same restyling to all the traces

Source

pub fn modify_text(values: Vec<Vec<impl AsRef<str>>>) -> RestyleHeatMap<X, Y, Z>

Apply the restyling individually to each trace. Caller is responsible to set the length of the vector to be equal to the number of traces

Source

pub fn transpose(self, value: bool) -> Box<Self>

Source

pub fn modify_all_transpose(value: bool) -> RestyleHeatMap<X, Y, Z>

Apply the same restyling to all the traces

Source

pub fn modify_transpose(values: Vec<bool>) -> RestyleHeatMap<X, Y, Z>

Apply the restyling individually to each trace. Caller is responsible to set the length of the vector to be equal to the number of traces

Source

pub fn visible(self, value: Visible) -> Box<Self>

Source

pub fn modify_all_visible(value: Visible) -> RestyleHeatMap<X, Y, Z>

Apply the same restyling to all the traces

Source

pub fn modify_visible(values: Vec<Visible>) -> RestyleHeatMap<X, Y, Z>

Apply the restyling individually to each trace. Caller is responsible to set the length of the vector to be equal to the number of traces

Source

pub fn x(self, value: Vec<X>) -> Box<Self>

Source

pub fn modify_all_x(value: Vec<X>) -> RestyleHeatMap<X, Y, Z>

Apply the same restyling to all the traces

Source

pub fn modify_x(values: Vec<Vec<X>>) -> RestyleHeatMap<X, Y, Z>

Apply the restyling individually to each trace. Caller is responsible to set the length of the vector to be equal to the number of traces

Source

pub fn x_axis(self, value: impl AsRef<str>) -> Box<Self>

Source

pub fn modify_all_x_axis(value: impl AsRef<str>) -> RestyleHeatMap<X, Y, Z>

Apply the same restyling to all the traces

Source

pub fn modify_x_axis(values: Vec<impl AsRef<str>>) -> RestyleHeatMap<X, Y, Z>

Apply the restyling individually to each trace. Caller is responsible to set the length of the vector to be equal to the number of traces

Source

pub fn x_calendar(self, value: Calendar) -> Box<Self>

Source

pub fn modify_all_x_calendar(value: Calendar) -> RestyleHeatMap<X, Y, Z>

Apply the same restyling to all the traces

Source

pub fn modify_x_calendar(values: Vec<Calendar>) -> RestyleHeatMap<X, Y, Z>

Apply the restyling individually to each trace. Caller is responsible to set the length of the vector to be equal to the number of traces

Source

pub fn y(self, value: Vec<Y>) -> Box<Self>

Source

pub fn modify_all_y(value: Vec<Y>) -> RestyleHeatMap<X, Y, Z>

Apply the same restyling to all the traces

Source

pub fn modify_y(values: Vec<Vec<Y>>) -> RestyleHeatMap<X, Y, Z>

Apply the restyling individually to each trace. Caller is responsible to set the length of the vector to be equal to the number of traces

Source

pub fn y_axis(self, value: impl AsRef<str>) -> Box<Self>

Source

pub fn modify_all_y_axis(value: impl AsRef<str>) -> RestyleHeatMap<X, Y, Z>

Apply the same restyling to all the traces

Source

pub fn modify_y_axis(values: Vec<impl AsRef<str>>) -> RestyleHeatMap<X, Y, Z>

Apply the restyling individually to each trace. Caller is responsible to set the length of the vector to be equal to the number of traces

Source

pub fn y_calendar(self, value: Calendar) -> Box<Self>

Source

pub fn modify_all_y_calendar(value: Calendar) -> RestyleHeatMap<X, Y, Z>

Apply the same restyling to all the traces

Source

pub fn modify_y_calendar(values: Vec<Calendar>) -> RestyleHeatMap<X, Y, Z>

Apply the restyling individually to each trace. Caller is responsible to set the length of the vector to be equal to the number of traces

Source

pub fn z(self, value: Vec<Z>) -> Box<Self>

Source

pub fn modify_all_z(value: Vec<Z>) -> RestyleHeatMap<X, Y, Z>

Apply the same restyling to all the traces

Source

pub fn modify_z(values: Vec<Vec<Z>>) -> RestyleHeatMap<X, Y, Z>

Apply the restyling individually to each trace. Caller is responsible to set the length of the vector to be equal to the number of traces

Source

pub fn zauto(self, value: bool) -> Box<Self>

Source

pub fn modify_all_zauto(value: bool) -> RestyleHeatMap<X, Y, Z>

Apply the same restyling to all the traces

Source

pub fn modify_zauto(values: Vec<bool>) -> RestyleHeatMap<X, Y, Z>

Apply the restyling individually to each trace. Caller is responsible to set the length of the vector to be equal to the number of traces

Source

pub fn zhover_format(self, value: impl AsRef<str>) -> Box<Self>

Source

pub fn modify_all_zhover_format( value: impl AsRef<str>, ) -> RestyleHeatMap<X, Y, Z>

Apply the same restyling to all the traces

Source

pub fn modify_zhover_format( values: Vec<impl AsRef<str>>, ) -> RestyleHeatMap<X, Y, Z>

Apply the restyling individually to each trace. Caller is responsible to set the length of the vector to be equal to the number of traces

Source

pub fn zmax(self, value: f64) -> Box<Self>

Source

pub fn modify_all_zmax(value: f64) -> RestyleHeatMap<X, Y, Z>

Apply the same restyling to all the traces

Source

pub fn modify_zmax(values: Vec<f64>) -> RestyleHeatMap<X, Y, Z>

Apply the restyling individually to each trace. Caller is responsible to set the length of the vector to be equal to the number of traces

Source

pub fn zmid(self, value: f64) -> Box<Self>

Source

pub fn modify_all_zmid(value: f64) -> RestyleHeatMap<X, Y, Z>

Apply the same restyling to all the traces

Source

pub fn modify_zmid(values: Vec<f64>) -> RestyleHeatMap<X, Y, Z>

Apply the restyling individually to each trace. Caller is responsible to set the length of the vector to be equal to the number of traces

Source

pub fn zmin(self, value: f64) -> Box<Self>

Source

pub fn modify_all_zmin(value: f64) -> RestyleHeatMap<X, Y, Z>

Apply the same restyling to all the traces

Source

pub fn modify_zmin(values: Vec<f64>) -> RestyleHeatMap<X, Y, Z>

Apply the restyling individually to each trace. Caller is responsible to set the length of the vector to be equal to the number of traces

Source

pub fn zsmooth(self, value: Smoothing) -> Box<Self>

Source

pub fn modify_all_zsmooth(value: Smoothing) -> RestyleHeatMap<X, Y, Z>

Apply the same restyling to all the traces

Source

pub fn modify_zsmooth(values: Vec<Smoothing>) -> RestyleHeatMap<X, Y, Z>

Apply the restyling individually to each trace. Caller is responsible to set the length of the vector to be equal to the number of traces

Source§

impl<Z> HeatMap<f64, f64, Z>
where Z: Serialize + Clone,

Source

pub fn new_z(z: Vec<Z>) -> Box<Self>

Source§

impl<X, Y, Z> HeatMap<X, Y, Z>
where X: Serialize + Clone, Y: Serialize + Clone, Z: Serialize + Clone,

Source

pub fn new(x: Vec<X>, y: Vec<Y>, z: Vec<Z>) -> Box<Self>

Trait Implementations§

Source§

impl<X, Y, Z> Clone for HeatMap<X, Y, Z>
where X: Serialize + Clone + Clone, Y: Serialize + Clone + Clone, Z: Serialize + Clone + Clone,

Source§

fn clone(&self) -> HeatMap<X, Y, Z>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<X, Y, Z> Debug for HeatMap<X, Y, Z>
where X: Serialize + Clone + Debug, Y: Serialize + Clone + Debug, Z: Serialize + Clone + Debug,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<X, Y, Z> Default for HeatMap<X, Y, Z>
where X: Serialize + Clone, Y: Serialize + Clone, Z: Serialize + Clone,

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<X, Y, Z> Serialize for HeatMap<X, Y, Z>

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl<X, Y, Z> Trace for HeatMap<X, Y, Z>
where X: Serialize + Clone, Y: Serialize + Clone, Z: Serialize + Clone,

Source§

fn to_json(&self) -> String

Auto Trait Implementations§

§

impl<X, Y, Z> Freeze for HeatMap<X, Y, Z>

§

impl<X, Y, Z> !RefUnwindSafe for HeatMap<X, Y, Z>

§

impl<X, Y, Z> Send for HeatMap<X, Y, Z>
where X: Send, Y: Send, Z: Send,

§

impl<X, Y, Z> Sync for HeatMap<X, Y, Z>
where X: Sync, Y: Sync, Z: Sync,

§

impl<X, Y, Z> Unpin for HeatMap<X, Y, Z>
where X: Unpin, Y: Unpin, Z: Unpin,

§

impl<X, Y, Z> !UnwindSafe for HeatMap<X, Y, Z>

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

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> Serialize for T
where T: Serialize + ?Sized,

Source§

fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<(), Error>

Source§

fn do_erased_serialize( &self, serializer: &mut dyn Serializer, ) -> Result<(), ErrorImpl>

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.