pub struct Ruler { /* private fields */ }Expand description
A horizontal/vertical axis with fixed-size, nonoverlapping labels.
Implementations§
Source§impl Ruler
impl Ruler
Sourcepub fn horizontal(scale: Scale, baseline: f64) -> Self
pub fn horizontal(scale: Scale, baseline: f64) -> Self
Creates an X-axis at the supplied Y coordinate.
Sourcepub fn vertical(scale: Scale, baseline: f64) -> Self
pub fn vertical(scale: Scale, baseline: f64) -> Self
Creates a Y-axis at the supplied X coordinate.
Sourcepub fn ticks(self, count: usize) -> Self
pub fn ticks(self, count: usize) -> Self
Selects uniform ticks including endpoints; valid count is 2..=256.
Sourcepub fn nice_ticks(self, count: usize) -> Self
pub fn nice_ticks(self, count: usize) -> Self
Selects at most the supplied number of aligned ticks; valid budget is 2..=256.
Sourcepub fn tick_length(self, length: f64) -> Self
pub fn tick_length(self, length: f64) -> Self
Replaces finite nonnegative tick length.
Sourcepub fn line_width(self, width: f64) -> Self
pub fn line_width(self, width: f64) -> Self
Replaces positive finite axis/mark width.
Sourcepub fn label_size(self, size: Size) -> Self
pub fn label_size(self, size: Size) -> Self
Replaces explicitly authored positive label dimensions.
Trait Implementations§
Auto Trait Implementations§
impl Forget for Ruler
impl Freeze for Ruler
impl Move for Ruler
impl RefUnwindSafe for Ruler
impl Send for Ruler
impl Sync for Ruler
impl Unpin for Ruler
impl UnsafeUnpin for Ruler
impl UnwindSafe for Ruler
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