pub struct Contour<Z, X = f64, Y = f64>{ /* private fields */ }
Expand description
Construct a contour trace.
§Examples
use plotly::Contour;
let trace = Contour::new(
vec![0.0, 2.5, 5.0],
vec![0.0, 7.5, 15.0],
vec![
vec![0.0, 5.0, 10.0],
vec![5.0, 2.5, 0.0],
vec![10.0, 5.0, 0.0],
],
);
let expected = serde_json::json!({
"type": "contour",
"x": [0.0, 2.5, 5.0],
"y": [0.0, 7.5, 15.0],
"z": [[0.0, 5.0, 10.0], [5.0, 2.5, 0.0], [10.0, 5.0, 0.0]]
});
assert_eq!(serde_json::to_value(trace).unwrap(), expected);
Implementations§
Source§impl<Z, X, Y> Contour<Z, X, Y>
impl<Z, X, Y> Contour<Z, X, Y>
pub fn new(x: Vec<X>, y: Vec<Y>, z: Vec<Z>) -> Box<Contour<Z, X, Y>>
pub fn auto_color_scale(self, auto_color_scale: bool) -> Box<Contour<Z, X, Y>>
pub fn auto_contour(self, auto_contour: bool) -> Box<Contour<Z, X, Y>>
pub fn color_bar(self, color_bar: ColorBar) -> Box<Contour<Z, X, Y>>
pub fn color_scale(self, color_scale: ColorScale) -> Box<Contour<Z, X, Y>>
pub fn connect_gaps(self, connect_gaps: bool) -> Box<Contour<Z, X, Y>>
pub fn contours(self, contours: Contours) -> Box<Contour<Z, X, Y>>
pub fn dx(self, dx: X) -> Box<Contour<Z, X, Y>>
pub fn dy(self, dy: Y) -> Box<Contour<Z, X, Y>>
pub fn fill_color<C>(self, fill_color: C) -> Box<Contour<Z, X, Y>>where
C: Color,
pub fn hover_info(self, hover_info: HoverInfo) -> Box<Contour<Z, X, Y>>
pub fn hover_label(self, hover_label: Label) -> Box<Contour<Z, X, Y>>
pub fn hover_on_gaps(self, hover_on_gaps: bool) -> Box<Contour<Z, X, Y>>
pub fn hover_template(self, hover_template: &str) -> Box<Contour<Z, X, Y>>
pub fn hover_template_array<S>( self, hover_template: Vec<S>, ) -> Box<Contour<Z, X, Y>>
pub fn hover_text<S>(self, hover_text: Vec<S>) -> Box<Contour<Z, X, Y>>
pub fn legend_group(self, legend_group: &str) -> Box<Contour<Z, X, Y>>
pub fn legend_group_title( self, legend_group_title: LegendGroupTitle, ) -> Box<Contour<Z, X, Y>>
pub fn line(self, line: Line) -> Box<Contour<Z, X, Y>>
pub fn name(self, name: &str) -> Box<Contour<Z, X, Y>>
pub fn n_contours(self, n_contours: usize) -> Box<Contour<Z, X, Y>>
pub fn opacity(self, opacity: f64) -> Box<Contour<Z, X, Y>>
pub fn reverse_scale(self, reverse_scale: bool) -> Box<Contour<Z, X, Y>>
pub fn show_legend(self, show_legend: bool) -> Box<Contour<Z, X, Y>>
pub fn show_scale(self, show_scale: bool) -> Box<Contour<Z, X, Y>>
pub fn text<S>(self, text: Vec<S>) -> Box<Contour<Z, X, Y>>
pub fn transpose(self, transpose: bool) -> Box<Contour<Z, X, Y>>
pub fn visible(self, visible: Visible) -> Box<Contour<Z, X, Y>>
pub fn x(self, x: Vec<X>) -> Box<Contour<Z, X, Y>>
pub fn x_axis(self, axis: &str) -> Box<Contour<Z, X, Y>>
pub fn x_calendar(self, x_calendar: Calendar) -> Box<Contour<Z, X, Y>>
pub fn x0(self, x0: X) -> Box<Contour<Z, X, Y>>
pub fn y_axis(self, axis: &str) -> Box<Contour<Z, X, Y>>
pub fn y(self, y: Vec<Y>) -> Box<Contour<Z, X, Y>>
pub fn y_calendar(self, y_calendar: Calendar) -> Box<Contour<Z, X, Y>>
pub fn y0(self, y0: Y) -> Box<Contour<Z, X, Y>>
pub fn zauto(self, zauto: bool) -> Box<Contour<Z, X, Y>>
pub fn zhover_format(self, zhover_format: &str) -> Box<Contour<Z, X, Y>>
pub fn zmax(self, zmax: Z) -> Box<Contour<Z, X, Y>>
pub fn zmid(self, zmid: Z) -> Box<Contour<Z, X, Y>>
pub fn zmin(self, zmin: Z) -> Box<Contour<Z, X, Y>>
Trait Implementations§
Source§impl<Z, X, Y> Serialize for Contour<Z, X, Y>
impl<Z, X, Y> Serialize for Contour<Z, X, Y>
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl<Z, X, Y> Freeze for Contour<Z, X, Y>
impl<Z, X = f64, Y = f64> !RefUnwindSafe for Contour<Z, X, Y>
impl<Z, X, Y> Send for Contour<Z, X, Y>
impl<Z, X, Y> Sync for Contour<Z, X, Y>
impl<Z, X, Y> Unpin for Contour<Z, X, Y>
impl<Z, X = f64, Y = f64> !UnwindSafe for Contour<Z, X, Y>
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