pub struct ScatterPlotBuilder<'a, T: PartialOrd + Copy + ToPrimitive + Debug> { /* private fields */ }Expand description
Builder for a Scatter Plot Set various options for plotting the points.
§Options
data- Input points.domain_and_range- Domain and range over which to plot the region. Default is computed.padding- Proportion of domain and range to pad the plot with. Default is 0.1.size- Dimensions (in characters) of the outputted plot. Default is (60, 30).title- Optional title for the plot. Default is None.axes- Whether or not to display axes and axes labels. Default is true.chars- Charset to be used for plotting. Any set incgrustplot::helper::charset::subdiv_charsworks. Default is computed.
Implementations§
Source§impl<'a, T: PartialOrd + Copy + ToPrimitive + Debug> ScatterPlotBuilder<'a, T>
impl<'a, T: PartialOrd + Copy + ToPrimitive + Debug> ScatterPlotBuilder<'a, T>
pub fn set_range(&mut self, range: ((f64, f64), (f64, f64))) -> &mut Self
pub fn set_padding(&mut self, padding: f64) -> &mut Self
pub fn set_size(&mut self, size: (u32, u32)) -> &mut Self
pub fn set_title<'b: 'a>(&mut self, title: &'b str) -> &mut Self
pub fn set_axes(&mut self, do_axes: bool) -> &mut Self
Sourcepub fn set_chars(&mut self, chars: (Vec<char>, (u32, u32))) -> &mut Self
pub fn set_chars(&mut self, chars: (Vec<char>, (u32, u32))) -> &mut Self
In addition to the chars, it also needs the dimensions of the charset. If it’s named “something_x_by_y”, then set the dimensions to be (x, y).
e.g. dots_two_by_four should be input as .set_chars((dots_two_by_four(), (2, 4)))
Sourcepub fn as_image(&self) -> RenderableTextBuilder<'_>
pub fn as_image(&self) -> RenderableTextBuilder<'_>
Returns a rendered text builder to render a string
Sourcepub fn save_pyplot(&self, path: &str)
pub fn save_pyplot(&self, path: &str)
Saves the plot’s data using pyplot
Trait Implementations§
Source§impl<'a, T: Clone + PartialOrd + Copy + ToPrimitive + Debug> Clone for ScatterPlotBuilder<'a, T>
impl<'a, T: Clone + PartialOrd + Copy + ToPrimitive + Debug> Clone for ScatterPlotBuilder<'a, T>
Source§fn clone(&self) -> ScatterPlotBuilder<'a, T>
fn clone(&self) -> ScatterPlotBuilder<'a, T>
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 moreAuto Trait Implementations§
impl<'a, T> Freeze for ScatterPlotBuilder<'a, T>
impl<'a, T> RefUnwindSafe for ScatterPlotBuilder<'a, T>where
T: RefUnwindSafe,
impl<'a, T> Send for ScatterPlotBuilder<'a, T>where
T: Sync,
impl<'a, T> Sync for ScatterPlotBuilder<'a, T>where
T: Sync,
impl<'a, T> Unpin for ScatterPlotBuilder<'a, T>
impl<'a, T> UnsafeUnpin for ScatterPlotBuilder<'a, T>
impl<'a, T> UnwindSafe for ScatterPlotBuilder<'a, T>where
T: RefUnwindSafe,
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<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