pub struct PlotBounds { /* private fields */ }Expand description
2D bounding box of f64 precision.
The range of data values we show.
Implementations§
Source§impl PlotBounds
impl PlotBounds
pub const NOTHING: PlotBounds
pub fn from_min_max(min: [f64; 2], max: [f64; 2]) -> PlotBounds
pub fn min(&self) -> [f64; 2]
pub fn max(&self) -> [f64; 2]
pub fn new_symmetrical(half_extent: f64) -> PlotBounds
pub fn is_finite(&self) -> bool
pub fn is_finite_x(&self) -> bool
pub fn is_finite_y(&self) -> bool
pub fn is_valid(&self) -> bool
pub fn is_valid_x(&self) -> bool
pub fn is_valid_y(&self) -> bool
pub fn width(&self) -> f64
pub fn height(&self) -> f64
pub fn center(&self) -> PlotPoint
Sourcepub fn extend_with(&mut self, value: &PlotPoint)
pub fn extend_with(&mut self, value: &PlotPoint)
Expand to include the given (x,y) value
Sourcepub fn extend_with_x(&mut self, x: f64)
pub fn extend_with_x(&mut self, x: f64)
Expand to include the given x coordinate
Sourcepub fn extend_with_y(&mut self, y: f64)
pub fn extend_with_y(&mut self, y: f64)
Expand to include the given y coordinate
pub fn expand_x(&mut self, pad: f64)
pub fn expand_y(&mut self, pad: f64)
pub fn merge_x(&mut self, other: &PlotBounds)
pub fn merge_y(&mut self, other: &PlotBounds)
pub fn set_x(&mut self, other: &PlotBounds)
pub fn set_y(&mut self, other: &PlotBounds)
pub fn merge(&mut self, other: &PlotBounds)
pub fn translate_x(&mut self, delta: f64)
pub fn translate_y(&mut self, delta: f64)
pub fn translate(&mut self, delta: Vec2)
pub fn zoom(&mut self, zoom_factor: Vec2, center: PlotPoint)
pub fn add_relative_margin_x(&mut self, margin_fraction: Vec2)
pub fn add_relative_margin_y(&mut self, margin_fraction: Vec2)
pub fn range_x(&self) -> RangeInclusive<f64> ⓘ
pub fn range_y(&self) -> RangeInclusive<f64> ⓘ
pub fn make_x_symmetrical(&mut self)
pub fn make_y_symmetrical(&mut self)
Trait Implementations§
Source§impl Clone for PlotBounds
impl Clone for PlotBounds
Source§fn clone(&self) -> PlotBounds
fn clone(&self) -> PlotBounds
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PlotBounds
impl Debug for PlotBounds
Source§impl PartialEq for PlotBounds
impl PartialEq for PlotBounds
impl Copy for PlotBounds
impl StructuralPartialEq for PlotBounds
Auto Trait Implementations§
impl Freeze for PlotBounds
impl RefUnwindSafe for PlotBounds
impl Send for PlotBounds
impl Sync for PlotBounds
impl Unpin for PlotBounds
impl UnwindSafe for PlotBounds
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<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
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