Struct egui::widgets::plot::Curve[][src]

pub struct Curve { /* fields omitted */ }

A series of values forming a path.

Implementations

impl Curve[src]

pub fn from_values(values: Vec<Value>) -> Self[src]

pub fn from_values_iter(iter: impl Iterator<Item = Value>) -> Self[src]

pub fn from_explicit_callback(
    function: impl Fn(f64) -> f64 + 'static,
    x_range: RangeInclusive<f64>,
    points: usize
) -> Self
[src]

Draw a curve based on a function y=f(x), a range (which can be infinite) for x and the number of points.

pub fn from_parametric_callback(
    function: impl Fn(f64) -> (f64, f64),
    t_range: RangeInclusive<f64>,
    points: usize
) -> Self
[src]

Draw a curve based on a function (x,y)=f(t), a range for t and the number of points.

pub fn from_ys_f32(ys: &[f32]) -> Self[src]

From a series of y-values. The x-values will be the indices of these values

pub fn stroke(self, stroke: impl Into<Stroke>) -> Self[src]

Add a stroke.

pub fn width(self, width: f32) -> Self[src]

Stroke width. A high value means the plot thickens.

pub fn color(self, color: impl Into<Color32>) -> Self[src]

Stroke color. Default is Color32::TRANSPARENT which means a color will be auto-assigned.

pub fn name(self, name: impl ToString) -> Self[src]

Name of this curve.

If a curve is given a name it will show up in the plot legend (if legends are turned on).

Auto Trait Implementations

impl !RefUnwindSafe for Curve

impl !Send for Curve

impl !Sync for Curve

impl Unpin for Curve

impl !UnwindSafe for Curve

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.