pub struct Layout { /* private fields */ }
Implementations§
Source§impl Layout
impl Layout
pub fn new() -> Layout
pub fn title(self, title: Title) -> Layout
pub fn show_legend(self, show_legend: bool) -> Layout
pub fn legend(self, legend: Legend) -> Layout
pub fn margin(self, margin: Margin) -> Layout
pub fn auto_size(self, auto_size: bool) -> Layout
pub fn width(self, width: usize) -> Layout
pub fn height(self, height: usize) -> Layout
pub fn font(self, font: Font) -> Layout
pub fn uniform_text(self, uniform_text: UniformText) -> Layout
pub fn separators(self, separators: &str) -> Layout
pub fn paper_background_color<C>(self, paper_background_color: C) -> Layoutwhere
C: Color,
pub fn plot_background_color<C>(self, plot_background_color: C) -> Layoutwhere
C: Color,
pub fn color_scale(self, color_scale: LayoutColorScale) -> Layout
pub fn colorway<C>(self, colorway: Vec<C>) -> Layoutwhere
C: Color,
pub fn color_axis(self, color_axis: ColorAxis) -> Layout
pub fn mode_bar(self, mode_bar: ModeBar) -> Layout
Sourcepub fn hover_mode(self, hover_mode: HoverMode) -> Layout
pub fn hover_mode(self, hover_mode: HoverMode) -> Layout
Determines the mode of hover interactions. If “closest”, a single hoverlabel will appear for the “closest”
point within the hoverdistance
. If “x” (or “y”), multiple hoverlabels will appear for multiple points at
the “closest” x- (or y-) coordinate within the hoverdistance
, with the caveat that no more than one hoverlabel
will appear per trace. If “x unified” (or “y unified”), a single hoverlabel will appear multiple points at
the closest x- (or y-) coordinate within the hoverdistance
with the caveat that no more than one hoverlabel
will appear per trace. In this mode, spikelines are enabled by default perpendicular to the specified axis.
If false, hover interactions are disabled. If clickmode
includes the “select” flag, hovermode
defaults to
“closest”. If clickmode
lacks the “select” flag, it defaults to “x” or “y”
(depending on the trace’s orientation
value) for plots based on cartesian coordinates. For anything
else the default value is “closest”.
pub fn click_mode(self, click_mode: &str) -> Layout
pub fn drag_mode(self, drag_mode: &str) -> Layout
pub fn select_direction(self, select_direction: &str) -> Layout
pub fn hover_distance(self, hover_distance: i32) -> Layout
pub fn spike_distance(self, spike_distance: i32) -> Layout
pub fn hover_label(self, hover_label: Label) -> Layout
pub fn grid(self, grid: LayoutGrid) -> Layout
pub fn calendar(self, calendar: Calendar) -> Layout
pub fn x_axis(self, xaxis: Axis) -> Layout
pub fn y_axis(self, yaxis: Axis) -> Layout
pub fn x_axis2(self, xaxis: Axis) -> Layout
pub fn y_axis2(self, yaxis: Axis) -> Layout
pub fn x_axis3(self, xaxis: Axis) -> Layout
pub fn y_axis3(self, yaxis: Axis) -> Layout
pub fn x_axis4(self, xaxis: Axis) -> Layout
pub fn y_axis4(self, yaxis: Axis) -> Layout
pub fn x_axis5(self, xaxis: Axis) -> Layout
pub fn y_axis5(self, yaxis: Axis) -> Layout
pub fn x_axis6(self, xaxis: Axis) -> Layout
pub fn y_axis6(self, yaxis: Axis) -> Layout
pub fn x_axis7(self, xaxis: Axis) -> Layout
pub fn y_axis7(self, yaxis: Axis) -> Layout
pub fn x_axis8(self, xaxis: Axis) -> Layout
pub fn y_axis8(self, yaxis: Axis) -> Layout
pub fn annotations(self, annotations: Vec<Annotation>) -> Layout
pub fn add_annotation(&mut self, annotation: Annotation)
pub fn shapes(self, shapes: Vec<Shape>) -> Layout
pub fn add_shape(&mut self, shape: Shape)
pub fn new_shape(self, new_shape: NewShape) -> Layout
pub fn active_shape(self, active_shape: ActiveShape) -> Layout
pub fn template(self, template: &str) -> Layout
pub fn box_mode(self, box_mode: BoxMode) -> Layout
pub fn box_gap(self, box_gap: f64) -> Layout
pub fn box_group_gap(self, box_group_gap: f64) -> Layout
pub fn bar_mode(self, bar_mode: BarMode) -> Layout
pub fn bar_norm(self, bar_norm: BarNorm) -> Layout
pub fn bar_gap(self, bar_gap: f64) -> Layout
pub fn bar_group_gap(self, bar_group_gap: f64) -> Layout
pub fn violin_mode(self, violin_mode: ViolinMode) -> Layout
pub fn violin_gap(self, violin_gap: f64) -> Layout
pub fn violin_group_gap(self, violin_group_gap: f64) -> Layout
pub fn waterfall_mode(self, waterfall_mode: WaterfallMode) -> Layout
pub fn waterfall_gap(self, waterfall_gap: f64) -> Layout
pub fn waterfall_group_gap(self, waterfall_group_gap: f64) -> Layout
pub fn pie_colorway<C>(self, pie_colorway: Vec<C>) -> Layoutwhere
C: Color,
pub fn extend_pie_colors(self, extend_pie_colors: bool) -> Layout
pub fn sunburst_colorway<C>(self, sunburst_colorway: Vec<C>) -> Layoutwhere
C: Color,
pub fn extend_sunburst_colors(self, extend_sunburst_colors: bool) -> Layout
Trait Implementations§
Source§impl Serialize for Layout
impl Serialize for Layout
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,
Auto Trait Implementations§
impl Freeze for Layout
impl RefUnwindSafe for Layout
impl Send for Layout
impl Sync for Layout
impl Unpin for Layout
impl UnwindSafe for Layout
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
Source§impl<T> FmtForward for T
impl<T> FmtForward for T
Source§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self
to use its Binary
implementation when Debug
-formatted.Source§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self
to use its Display
implementation when
Debug
-formatted.Source§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self
to use its LowerExp
implementation when
Debug
-formatted.Source§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self
to use its LowerHex
implementation when
Debug
-formatted.Source§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self
to use its Octal
implementation when Debug
-formatted.Source§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self
to use its Pointer
implementation when
Debug
-formatted.Source§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self
to use its UpperExp
implementation when
Debug
-formatted.Source§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self
to use its UpperHex
implementation when
Debug
-formatted.Source§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
Source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Source§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self
and passes that borrow into the pipe function. Read moreSource§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self
and passes that borrow into the pipe function. Read moreSource§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
Source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
Source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self
, then passes self.as_ref()
into the pipe function.Source§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self
, then passes self.as_mut()
into the pipe
function.Source§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self
, then passes self.deref()
into the pipe function.Source§impl<T> PipeAsRef for T
impl<T> PipeAsRef for T
Source§impl<T> PipeBorrow for T
impl<T> PipeBorrow for T
Source§impl<T> PipeDeref for T
impl<T> PipeDeref for T
Source§impl<T> PipeRef for T
impl<T> PipeRef for T
Source§impl<T> Tap for T
impl<T> Tap for T
Source§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B>
of a value. Read moreSource§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B>
of a value. Read moreSource§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R>
view of a value. Read moreSource§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R>
view of a value. Read moreSource§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target
of a value. Read moreSource§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target
of a value. Read moreSource§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap()
only in debug builds, and is erased in release builds.Source§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut()
only in debug builds, and is erased in release
builds.Source§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow()
only in debug builds, and is erased in release
builds.Source§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut()
only in debug builds, and is erased in release
builds.Source§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref()
only in debug builds, and is erased in release
builds.Source§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut()
only in debug builds, and is erased in release
builds.Source§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref()
only in debug builds, and is erased in release
builds.Source§impl<T> Tap for T
impl<T> Tap for T
Source§fn tap<F, R>(self, func: F) -> Selfwhere
F: FnOnce(&Self) -> R,
fn tap<F, R>(self, func: F) -> Selfwhere
F: FnOnce(&Self) -> R,
Source§fn tap_dbg<F, R>(self, func: F) -> Selfwhere
F: FnOnce(&Self) -> R,
fn tap_dbg<F, R>(self, func: F) -> Selfwhere
F: FnOnce(&Self) -> R,
tap
in debug builds, and does nothing in release builds.Source§fn tap_mut<F, R>(self, func: F) -> Selfwhere
F: FnOnce(&mut Self) -> R,
fn tap_mut<F, R>(self, func: F) -> Selfwhere
F: FnOnce(&mut Self) -> R,
Source§fn tap_mut_dbg<F, R>(self, func: F) -> Selfwhere
F: FnOnce(&mut Self) -> R,
fn tap_mut_dbg<F, R>(self, func: F) -> Selfwhere
F: FnOnce(&mut Self) -> R,
tap_mut
in debug builds, and does nothing in release builds.Source§impl<T, U> TapAsRef<U> for Twhere
U: ?Sized,
impl<T, U> TapAsRef<U> for Twhere
U: ?Sized,
Source§fn tap_ref<F, R>(self, func: F) -> Self
fn tap_ref<F, R>(self, func: F) -> Self
Source§fn tap_ref_dbg<F, R>(self, func: F) -> Self
fn tap_ref_dbg<F, R>(self, func: F) -> Self
tap_ref
in debug builds, and does nothing in release builds.Source§fn tap_ref_mut<F, R>(self, func: F) -> Self
fn tap_ref_mut<F, R>(self, func: F) -> Self
Source§impl<T, U> TapBorrow<U> for Twhere
U: ?Sized,
impl<T, U> TapBorrow<U> for Twhere
U: ?Sized,
Source§fn tap_borrow<F, R>(self, func: F) -> Self
fn tap_borrow<F, R>(self, func: F) -> Self
Source§fn tap_borrow_dbg<F, R>(self, func: F) -> Self
fn tap_borrow_dbg<F, R>(self, func: F) -> Self
tap_borrow
in debug builds, and does nothing in release builds.Source§fn tap_borrow_mut<F, R>(self, func: F) -> Self
fn tap_borrow_mut<F, R>(self, func: F) -> Self
Source§impl<T> TapDeref for T
impl<T> TapDeref for T
Source§fn tap_deref_dbg<F, R>(self, func: F) -> Self
fn tap_deref_dbg<F, R>(self, func: F) -> Self
tap_deref
in debug builds, and does nothing in release builds.Source§fn tap_deref_mut<F, R>(self, func: F) -> Self
fn tap_deref_mut<F, R>(self, func: F) -> Self
self
for modification.