Skip to main content

PlotConfigBuilder

Struct PlotConfigBuilder 

Source
pub struct PlotConfigBuilder { /* private fields */ }
Available on crate feature visualize only.
Expand description

Builder for PlotConfig.

Implementations§

Source§

impl PlotConfigBuilder

Source

pub fn backend(&mut self, value: PlotterBackend) -> &mut Self

Backend

Source

pub fn background_color(&mut self, value: Color) -> &mut Self

Background color

Source

pub fn title<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self

Title

Source

pub fn title_font_family<VALUE: Into<String>>( &mut self, value: VALUE, ) -> &mut Self

Font family of the title

Source

pub fn title_font_size<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self

Font size of the title

Source

pub fn title_font_style(&mut self, value: FontStyle) -> &mut Self

Font style of the title

Source

pub fn caption<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self

Caption

Source

pub fn caption_font_family<VALUE: Into<String>>( &mut self, value: VALUE, ) -> &mut Self

Font family of the caption

Source

pub fn caption_font_size<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self

Font size of the caption

Source

pub fn caption_font_style(&mut self, value: FontStyle) -> &mut Self

Font style of the caption

Source

pub fn margin<VALUE: Into<u32>>(&mut self, value: VALUE) -> &mut Self

The desired size of the four chart margins in backend units (pixels).

Source

pub fn x_label_area_size<VALUE: Into<u32>>(&mut self, value: VALUE) -> &mut Self

The desired size of the X label area in backend units (pixels). If set to 0, the X label area is removed.

Source

pub fn y_label_area_size<VALUE: Into<u32>>(&mut self, value: VALUE) -> &mut Self

The desired size of the Y label area in backend units (pixels). If set to 0, the Y label area is removed.

Source

pub fn x_spec<VALUE: Into<Range<f64>>>(&mut self, value: VALUE) -> &mut Self

Specifies the X axis range and data properties

Source

pub fn y_spec<VALUE: Into<Range<f64>>>(&mut self, value: VALUE) -> &mut Self

Specifies the Y axis range and data properties

Source

pub fn x_label<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self

X-axis label

Source

pub fn y_label<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self

Y-axis label

Source

pub fn time_step<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self

Time step

Source

pub fn size<VALUE: Into<(u32, u32)>>(&mut self, value: VALUE) -> &mut Self

Size (width, height) of the plot (pixels)

Source

pub fn output_path<VALUE: Into<PathBuf>>(&mut self, value: VALUE) -> &mut Self

Output file path

Source

pub fn show_grid(&mut self, value: bool) -> &mut Self

Whether to show grid lines

Source

pub fn line_color(&mut self, value: Color) -> &mut Self

Line color

Source

pub fn line_style(&mut self, value: LineStyle) -> &mut Self

Line style

Source

pub fn show_legend(&mut self, value: bool) -> &mut Self

Whether to show legend

Source

pub fn legend<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self

Legend title

Source

pub fn show_points(&mut self, value: bool) -> &mut Self

Whether to show points

Source

pub fn point_size<VALUE: Into<u32>>(&mut self, value: VALUE) -> &mut Self

Size of the points

Source

pub fn filled(&mut self, value: bool) -> &mut Self

Whether to fill the points with color

Source

pub fn dash_style<VALUE: Into<[u32; 3]>>(&mut self, value: VALUE) -> &mut Self

Dash style pattern [dash_length, spacing, stroke_width]

Source

pub fn dot_style<VALUE: Into<[u32; 2]>>(&mut self, value: VALUE) -> &mut Self

Dot style pattern size/stroke_width: The size/stroke_width of the marker spacing: The spacing between markers

Source

pub fn stairs(&mut self, value: bool) -> &mut Self

Whether to show stairs

Source

pub fn legend_position(&mut self, value: LegendPosition) -> &mut Self

Legend position

Source

pub fn build(&self) -> Result<PlotConfig, PlotConfigBuilderError>

Builds a new PlotConfig.

§Errors

If a required field has not been initialized.

Trait Implementations§

Source§

impl Clone for PlotConfigBuilder

Source§

fn clone(&self) -> PlotConfigBuilder

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Default for PlotConfigBuilder

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

Source§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
Source§

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

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
Source§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.