pub struct Plot<P, T>where
P: PlotBackend,
T: Value,{ /* private fields */ }Available on crate feature
plotting only.Expand description
A plot of one or more elements (fits, functions, etc) using a given backend.
Implementations§
Source§impl<P, T> Plot<P, T>where
P: PlotBackend,
T: Value,
impl<P, T> Plot<P, T>where
P: PlotBackend,
T: Value,
Sourcepub fn new(
root: &P::Root,
options: PlotOptions<T>,
function: &impl AsPlottingElement<T>,
) -> Result<Self, P::Error>
pub fn new( root: &P::Root, options: PlotOptions<T>, function: &impl AsPlottingElement<T>, ) -> Result<Self, P::Error>
Create a new plot with the given root, options, and primary function. The primary function is used to determine the axis ranges if they are not specified in the options.
§Errors
Returns an error if the plot cannot be created.
Sourcepub fn with_element(
&mut self,
element: &impl AsPlottingElement<T>,
) -> Result<&mut Self, P::Error>
pub fn with_element( &mut self, element: &impl AsPlottingElement<T>, ) -> Result<&mut Self, P::Error>
Add another plotting element to this plot.
The element will be converted into a plotting element using the same x-values, confidence, and noise tolerance as the initial function.
§Errors
Returns an error if the element cannot be added.
Auto Trait Implementations§
impl<P, T> Freeze for Plot<P, T>
impl<P, T> RefUnwindSafe for Plot<P, T>where
P: RefUnwindSafe,
T: RefUnwindSafe,
impl<P, T> Send for Plot<P, T>where
P: Send,
impl<P, T> Sync for Plot<P, T>where
P: Sync,
impl<P, T> Unpin for Plot<P, T>
impl<P, T> UnsafeUnpin for Plot<P, T>where
P: UnsafeUnpin,
T: UnsafeUnpin,
impl<P, T> UnwindSafe for Plot<P, T>where
P: UnwindSafe,
T: UnwindSafe,
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> 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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.