pub struct Series {
pub name: String,
pub kind: Kind,
pub points: Vec<[f64; 2]>,
pub slot: Option<usize>,
pub color: Option<Color32>,
}Expand description
A series of a plot: a name, a kind and its points.
Fields§
§name: StringIts name in the legend, the accessible summary and the collector.
kind: Kind§points: Vec<[f64; 2]>Its points, [x, y].
slot: Option<usize>Its slot of the categorical palette (default: its place among the plot’s series). Give an entity the same slot in every plot, so its colour follows it.
color: Option<Color32>A colour of its own, over the palette’s.
Implementations§
Source§impl Series
impl Series
pub fn new( name: impl Into<String>, kind: Kind, points: impl IntoIterator<Item = [f64; 2]>, ) -> Self
Sourcepub fn line(
name: impl Into<String>,
points: impl IntoIterator<Item = [f64; 2]>,
) -> Self
pub fn line( name: impl Into<String>, points: impl IntoIterator<Item = [f64; 2]>, ) -> Self
A line through points.
Sourcepub fn points(
name: impl Into<String>,
points: impl IntoIterator<Item = [f64; 2]>,
) -> Self
pub fn points( name: impl Into<String>, points: impl IntoIterator<Item = [f64; 2]>, ) -> Self
points alone, a scatter.
Sourcepub fn bars(
name: impl Into<String>,
points: impl IntoIterator<Item = [f64; 2]>,
) -> Self
pub fn bars( name: impl Into<String>, points: impl IntoIterator<Item = [f64; 2]>, ) -> Self
Bars of [x, height].
Sourcepub fn steps(
name: impl Into<String>,
points: impl IntoIterator<Item = [f64; 2]>,
) -> Self
pub fn steps( name: impl Into<String>, points: impl IntoIterator<Item = [f64; 2]>, ) -> Self
A stepped line through points, sorted by x: each y held until
the next x.
Sourcepub fn entity(self, path: &str) -> Self
pub fn entity(self, path: &str) -> Self
The slot an entity’s path hashes to (entity_slot): the entity
keeps its colour in every plot and every run, whatever else is
shown.
Trait Implementations§
impl StructuralPartialEq for Series
Auto Trait Implementations§
impl Freeze for Series
impl RefUnwindSafe for Series
impl Send for Series
impl Sync for Series
impl Unpin for Series
impl UnsafeUnpin for Series
impl UnwindSafe for Series
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,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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