pub struct PositionDodge2 {
pub padding: f64,
pub width: Option<f64>,
pub reverse: bool,
}Expand description
Like position_dodge but preserves total width and adds padding between
groups (ggplot2’s position_dodge2(width, padding, reverse)). Elements
are centred exactly as PositionDodge
places them; on a continuous axis xmin/xmax shrink to
(1 − padding) of each group’s share.
Fields§
§padding: f64§width: Option<f64>Total dodge width; None = the layer default (0.9).
reverse: boolReverse the group order.
Implementations§
Source§impl PositionDodge2
impl PositionDodge2
pub fn new(padding: f64) -> Self
Sourcepub fn with_width(self, width: f64) -> Self
pub fn with_width(self, width: f64) -> Self
Set the total dodge width.
Sourcepub fn with_reverse(self, reverse: bool) -> Self
pub fn with_reverse(self, reverse: bool) -> Self
Reverse the order of the dodged groups (reverse = TRUE).
Trait Implementations§
Source§impl Clone for PositionDodge2
impl Clone for PositionDodge2
Source§impl Debug for PositionDodge2
impl Debug for PositionDodge2
Source§impl Default for PositionDodge2
impl Default for PositionDodge2
Source§impl PartialEq for PositionDodge2
impl PartialEq for PositionDodge2
Source§impl Position for PositionDodge2
impl Position for PositionDodge2
impl StructuralPartialEq for PositionDodge2
Auto Trait Implementations§
impl Freeze for PositionDodge2
impl RefUnwindSafe for PositionDodge2
impl Send for PositionDodge2
impl Sync for PositionDodge2
impl Unpin for PositionDodge2
impl UnsafeUnpin for PositionDodge2
impl UnwindSafe for PositionDodge2
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