pub struct PositionDodge {
pub width: Option<f64>,
pub reverse: bool,
}Expand description
Place groups side-by-side (ggplot2’s position_dodge(width)).
Within each x position the groups present there (group / fill / colour
level, in first-appearance order — the legend order — or reversed with
with_reverse) share width (in x units; one
category on a discrete axis) and are centred on x:
offset = (k − (n − 1)/2) · width / n for the k-th of n groups. On a
continuous axis x itself moves; on a discrete axis the offset is stored in
the .x_dodge_offset column and applied by the geoms that support it
(point, pointrange, errorbar, linerange, ribbon, censor marks), so several
models’ intervals per term sit side by side — also under coord_flip.
PositionDodge is also usable as a value (the default, width from the
layer, 0.9), as before 0.17.
Fields§
§width: Option<f64>Total dodge width; None = the layer default (0.9).
reverse: boolReverse the group order (ggplot2 ≥ 3.5 reverse = TRUE).
Implementations§
Source§impl PositionDodge
impl PositionDodge
Trait Implementations§
Source§impl Clone for PositionDodge
impl Clone for PositionDodge
Source§impl Debug for PositionDodge
impl Debug for PositionDodge
Source§impl Default for PositionDodge
impl Default for PositionDodge
Source§impl PartialEq for PositionDodge
impl PartialEq for PositionDodge
Source§impl Position for PositionDodge
impl Position for PositionDodge
impl StructuralPartialEq for PositionDodge
Auto Trait Implementations§
impl Freeze for PositionDodge
impl RefUnwindSafe for PositionDodge
impl Send for PositionDodge
impl Sync for PositionDodge
impl Unpin for PositionDodge
impl UnsafeUnpin for PositionDodge
impl UnwindSafe for PositionDodge
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> 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> ⓘ
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> ⓘ
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