pub struct Axis { /* private fields */ }Expand description
The values one axis of a plot spans, start below end.
Built from any two values: they are put in order, a single value is widened around
itself (a flat series still gets an axis), and non-finite ones give 0..1.
Implementations§
Source§impl Axis
impl Axis
Sourcepub fn time(start: f64, end: f64) -> Self
pub fn time(start: f64, end: f64) -> Self
An axis of times from start to end, in seconds since 1970-01-01 UTC.
Sourcepub fn padded(self, fraction: f64) -> Self
pub fn padded(self, fraction: f64) -> Self
The axis grown by fraction of its span at each end: room around a series so it
does not touch the plot’s edges.
Sourcepub fn zoomed(self, factor: f64, anchor: f64) -> Self
pub fn zoomed(self, factor: f64, anchor: f64) -> Self
The axis scaled by factor around anchor, which stays where it is: below 1 zooms
in, above 1 out. A factor that is not above zero changes nothing.
Sourcepub fn fraction(&self, value: f64) -> f64
pub fn fraction(&self, value: f64) -> f64
Where value falls: 0 at start, 1 at end, beyond those outside the axis.
Trait Implementations§
impl Copy for Axis
impl StructuralPartialEq for Axis
Auto Trait Implementations§
impl Freeze for Axis
impl RefUnwindSafe for Axis
impl Send for Axis
impl Sync for Axis
impl Unpin for Axis
impl UnsafeUnpin for Axis
impl UnwindSafe for Axis
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