pub struct PositionStack {
pub vjust: f64,
}Expand description
Stack bars/areas on top of each other (ggplot2’s position_stack(vjust = )).
vjust places the row’s y within its stacked segment: 1 (the
default) puts it at the segment’s top — the pre-B3-4 behaviour, and
byte-identical (no ymax column is written). Anything else writes
y = (1 − vjust)·ymin + vjust·ymax and an ymax column holding the
segment’s top, so e.g. vjust(0.5) centres a label in its segment.
PositionStack is also usable as a bare value (vjust 1, as before
the struct gained fields) via the PositionStack
const.
Fields§
§vjust: f64Implementations§
Source§impl PositionStack
impl PositionStack
Sourcepub fn with_vjust(self, vjust: f64) -> Self
pub fn with_vjust(self, vjust: f64) -> Self
Place y within each stacked segment (0 = bottom, 0.5 =
middle, 1 = top, the default).
Trait Implementations§
Source§impl Clone for PositionStack
impl Clone for PositionStack
Source§impl Debug for PositionStack
impl Debug for PositionStack
Source§impl Default for PositionStack
impl Default for PositionStack
Source§impl PartialEq for PositionStack
impl PartialEq for PositionStack
Source§impl Position for PositionStack
impl Position for PositionStack
Source§fn compute(&self, data: &mut DataFrame, _params: &PositionParams)
fn compute(&self, data: &mut DataFrame, _params: &PositionParams)
Adjust positions for data.
fn name(&self) -> &str
Source§fn per_panel(&self) -> bool
fn per_panel(&self) -> bool
Whether this position must run separately per facet panel rather
than once on the pooled rows before facets are split (B3-3, D8).
Default
false. PositionStack/PositionFill override this to
true — a shared x category’s stack height must not mix rows from
different panels. Dodge and jitter stay pooled across panels for
now (a follow-up, sipemu/ggplot-rs#154).impl StructuralPartialEq for PositionStack
Auto Trait Implementations§
impl Freeze for PositionStack
impl RefUnwindSafe for PositionStack
impl Send for PositionStack
impl Sync for PositionStack
impl Unpin for PositionStack
impl UnsafeUnpin for PositionStack
impl UnwindSafe for PositionStack
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more