Enum me3_framework::overlay::widgets::plot::PlotPoints
source · [−]Expand description
Represents many PlotPoint
s.
These can be an owned Vec
or generated with a function.
Variants
Owned(Vec<PlotPoint, Global>)
Generator(ExplicitGenerator)
Implementations
sourceimpl PlotPoints
impl PlotPoints
pub fn new(points: Vec<[f64; 2], Global>) -> PlotPoints
pub fn points(&self) -> &[PlotPoint]
sourcepub fn from_explicit_callback(
function: impl Fn(f64) -> f64 + 'static,
x_range: impl RangeBounds<f64>,
points: usize
) -> PlotPoints
pub fn from_explicit_callback(
function: impl Fn(f64) -> f64 + 'static,
x_range: impl RangeBounds<f64>,
points: usize
) -> PlotPoints
Draw a line based on a function y=f(x)
, a range (which can be infinite) for x and the number of points.
sourcepub fn from_parametric_callback(
function: impl Fn(f64) -> (f64, f64),
t_range: impl RangeBounds<f64>,
points: usize
) -> PlotPoints
pub fn from_parametric_callback(
function: impl Fn(f64) -> (f64, f64),
t_range: impl RangeBounds<f64>,
points: usize
) -> PlotPoints
Draw a line based on a function (x,y)=f(t)
, a range for t and the number of points.
The range may be specified as start..end or as start..=end.
sourcepub fn from_ys_f32(ys: &[f32]) -> PlotPoints
pub fn from_ys_f32(ys: &[f32]) -> PlotPoints
From a series of y-values. The x-values will be the indices of these values
sourcepub fn from_ys_f64(ys: &[f64]) -> PlotPoints
pub fn from_ys_f64(ys: &[f64]) -> PlotPoints
From a series of y-values. The x-values will be the indices of these values
Trait Implementations
sourceimpl Default for PlotPoints
impl Default for PlotPoints
sourcefn default() -> PlotPoints
fn default() -> PlotPoints
Returns the “default value” for a type. Read more
sourceimpl From<[f64; 2]> for PlotPoints
impl From<[f64; 2]> for PlotPoints
sourcefn from(coordinate: [f64; 2]) -> PlotPoints
fn from(coordinate: [f64; 2]) -> PlotPoints
Converts to this type from the input type.
sourceimpl FromIterator<[f64; 2]> for PlotPoints
impl FromIterator<[f64; 2]> for PlotPoints
sourcefn from_iter<T>(iter: T) -> PlotPointswhere
T: IntoIterator<Item = [f64; 2]>,
fn from_iter<T>(iter: T) -> PlotPointswhere
T: IntoIterator<Item = [f64; 2]>,
Creates a value from an iterator. Read more
Auto Trait Implementations
impl !RefUnwindSafe for PlotPoints
impl !Send for PlotPoints
impl !Sync for PlotPoints
impl Unpin for PlotPoints
impl !UnwindSafe for PlotPoints
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more