Struct plotly::traces::surface::Surface

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

Construct a surface trace.

Examples

use plotly::Surface;

let trace = Surface::new(vec![vec![0, 1]]).x(vec![1, 2]).y(vec![2, 3]);
let expected = serde_json::json!({
    "type": "surface",
    "x": [1, 2],
    "y": [2, 3],
    "z": [[0, 1]],
});

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

Implementations§

source§

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

source

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

source

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

Apply the same restyling to all the traces

source

pub fn modify_x(values: Vec<Vec<X>>) -> RestyleSurface<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>) -> RestyleSurface<X, Y, Z>

Apply the same restyling to all the traces

source

pub fn modify_y(values: Vec<Vec<Y>>) -> RestyleSurface<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<Vec<Z>>) -> Box<Self>

source

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

Apply the same restyling to all the traces

source

pub fn modify_z(values: Vec<Vec<Vec<Z>>>) -> RestyleSurface<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 auto_color_scale(self, value: bool) -> Box<Self>

source

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

Apply the same restyling to all the traces

source

pub fn modify_auto_color_scale(values: Vec<bool>) -> RestyleSurface<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 cauto(self, value: bool) -> Box<Self>

source

pub fn modify_all_cauto(value: bool) -> RestyleSurface<X, Y, Z>

Apply the same restyling to all the traces

source

pub fn modify_cauto(values: Vec<bool>) -> RestyleSurface<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 cmax(self, value: f64) -> Box<Self>

source

pub fn modify_all_cmax(value: f64) -> RestyleSurface<X, Y, Z>

Apply the same restyling to all the traces

source

pub fn modify_cmax(values: Vec<f64>) -> RestyleSurface<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 cmid(self, value: f64) -> Box<Self>

source

pub fn modify_all_cmid(value: f64) -> RestyleSurface<X, Y, Z>

Apply the same restyling to all the traces

source

pub fn modify_cmid(values: Vec<f64>) -> RestyleSurface<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 cmin(self, value: f64) -> Box<Self>

source

pub fn modify_all_cmin(value: f64) -> RestyleSurface<X, Y, Z>

Apply the same restyling to all the traces

source

pub fn modify_cmin(values: Vec<f64>) -> RestyleSurface<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) -> RestyleSurface<X, Y, Z>

Apply the same restyling to all the traces

source

pub fn modify_color_bar(values: Vec<ColorBar>) -> RestyleSurface<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) -> RestyleSurface<X, Y, Z>

Apply the same restyling to all the traces

source

pub fn modify_color_scale(values: Vec<ColorScale>) -> RestyleSurface<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) -> RestyleSurface<X, Y, Z>

Apply the same restyling to all the traces

source

pub fn modify_connect_gaps(values: Vec<bool>) -> RestyleSurface<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 contours(self, value: SurfaceContours) -> Box<Self>

source

pub fn modify_all_contours(value: SurfaceContours) -> RestyleSurface<X, Y, Z>

Apply the same restyling to all the traces

source

pub fn modify_contours(values: Vec<SurfaceContours>) -> RestyleSurface<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 hide_surface(self, value: bool) -> Box<Self>

source

pub fn modify_all_hide_surface(value: bool) -> RestyleSurface<X, Y, Z>

Apply the same restyling to all the traces

source

pub fn modify_hide_surface(values: Vec<bool>) -> RestyleSurface<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) -> RestyleSurface<X, Y, Z>

Apply the same restyling to all the traces

source

pub fn modify_hover_info(values: Vec<HoverInfo>) -> RestyleSurface<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) -> RestyleSurface<X, Y, Z>

Apply the same restyling to all the traces

source

pub fn modify_hover_label(values: Vec<Label>) -> RestyleSurface<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> ) -> RestyleSurface<X, Y, Z>

Apply the same restyling to all the traces

source

pub fn modify_hover_template( values: Vec<impl AsRef<str>> ) -> RestyleSurface<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: impl AsRef<str>) -> Box<Self>

source

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

Apply the same restyling to all the traces

source

pub fn modify_hover_text( values: Vec<impl AsRef<str>> ) -> RestyleSurface<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_text_array(self, value: Vec<impl AsRef<str>>) -> Box<Self>

source

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

source

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

Apply the same restyling to all the traces

source

pub fn modify_legend_group( values: Vec<impl AsRef<str>> ) -> RestyleSurface<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: LegendGroupTitle) -> Box<Self>

source

pub fn modify_all_legend_group_title( value: LegendGroupTitle ) -> RestyleSurface<X, Y, Z>

Apply the same restyling to all the traces

source

pub fn modify_legend_group_title( values: Vec<LegendGroupTitle> ) -> RestyleSurface<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 light_position(self, value: Position) -> Box<Self>

source

pub fn modify_all_light_position(value: Position) -> RestyleSurface<X, Y, Z>

Apply the same restyling to all the traces

source

pub fn modify_light_position(values: Vec<Position>) -> RestyleSurface<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 lighting(self, value: Lighting) -> Box<Self>

source

pub fn modify_all_lighting(value: Lighting) -> RestyleSurface<X, Y, Z>

Apply the same restyling to all the traces

source

pub fn modify_lighting(values: Vec<Lighting>) -> RestyleSurface<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>) -> RestyleSurface<X, Y, Z>

Apply the same restyling to all the traces

source

pub fn modify_name(values: Vec<impl AsRef<str>>) -> RestyleSurface<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) -> RestyleSurface<X, Y, Z>

Apply the same restyling to all the traces

source

pub fn modify_opacity(values: Vec<f64>) -> RestyleSurface<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) -> RestyleSurface<X, Y, Z>

Apply the same restyling to all the traces

source

pub fn modify_reverse_scale(values: Vec<bool>) -> RestyleSurface<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) -> RestyleSurface<X, Y, Z>

Apply the same restyling to all the traces

source

pub fn modify_show_legend(values: Vec<bool>) -> RestyleSurface<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) -> RestyleSurface<X, Y, Z>

Apply the same restyling to all the traces

source

pub fn modify_show_scale(values: Vec<bool>) -> RestyleSurface<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 surface_color(self, value: Vec<impl Color>) -> Box<Self>

source

pub fn modify_all_surface_color( value: Vec<impl Color> ) -> RestyleSurface<X, Y, Z>

Apply the same restyling to all the traces

source

pub fn modify_surface_color( values: Vec<Vec<impl Color>> ) -> RestyleSurface<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: impl AsRef<str>) -> Box<Self>

source

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

Apply the same restyling to all the traces

source

pub fn modify_text(values: Vec<impl AsRef<str>>) -> RestyleSurface<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_array(self, value: Vec<impl AsRef<str>>) -> Box<Self>

source

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

source

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

Apply the same restyling to all the traces

source

pub fn modify_visible(values: Vec<Visible>) -> RestyleSurface<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) -> RestyleSurface<X, Y, Z>

Apply the same restyling to all the traces

source

pub fn modify_x_calendar(values: Vec<Calendar>) -> RestyleSurface<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) -> RestyleSurface<X, Y, Z>

Apply the same restyling to all the traces

source

pub fn modify_y_calendar(values: Vec<Calendar>) -> RestyleSurface<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_calendar(self, value: Calendar) -> Box<Self>

source

pub fn modify_all_z_calendar(value: Calendar) -> RestyleSurface<X, Y, Z>

Apply the same restyling to all the traces

source

pub fn modify_z_calendar(values: Vec<Calendar>) -> RestyleSurface<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<X, Y, Z> Surface<X, Y, Z>where X: Serialize + Clone, Y: Serialize + Clone, Z: Serialize + Clone,

source

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

Trait Implementations§

source§

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

source§

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

Returns a copy 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 Surface<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 Surface<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 Surface<X, Y, Z>where X: Serialize + Clone + Serialize, Y: Serialize + Clone + Serialize, Z: Serialize + Clone + Serialize,

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 Surface<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> !RefUnwindSafe for Surface<X, Y, Z>

§

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

§

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

§

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

§

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

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. Read more
source§

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

source§

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

source§

impl<T> ToOwned for Twhere T: Clone,

§

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 Twhere U: Into<T>,

§

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 Twhere U: TryFrom<T>,

§

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.
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V