pub struct PlotConfigBuilder { /* private fields */ }visualize only.Expand description
Builder for PlotConfig.
Implementations§
Source§impl PlotConfigBuilder
impl PlotConfigBuilder
Sourcepub fn backend(&mut self, value: PlotterBackend) -> &mut Self
pub fn backend(&mut self, value: PlotterBackend) -> &mut Self
Backend
Sourcepub fn background_color(&mut self, value: Color) -> &mut Self
pub fn background_color(&mut self, value: Color) -> &mut Self
Background color
Sourcepub fn title_font_family<VALUE: Into<String>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn title_font_family<VALUE: Into<String>>( &mut self, value: VALUE, ) -> &mut Self
Font family of the title
Sourcepub fn title_font_size<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
pub fn title_font_size<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
Font size of the title
Sourcepub fn title_font_style(&mut self, value: FontStyle) -> &mut Self
pub fn title_font_style(&mut self, value: FontStyle) -> &mut Self
Font style of the title
Sourcepub fn caption_font_family<VALUE: Into<String>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn caption_font_family<VALUE: Into<String>>( &mut self, value: VALUE, ) -> &mut Self
Font family of the caption
Sourcepub fn caption_font_size<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
pub fn caption_font_size<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
Font size of the caption
Sourcepub fn caption_font_style(&mut self, value: FontStyle) -> &mut Self
pub fn caption_font_style(&mut self, value: FontStyle) -> &mut Self
Font style of the caption
Sourcepub fn margin<VALUE: Into<u32>>(&mut self, value: VALUE) -> &mut Self
pub fn margin<VALUE: Into<u32>>(&mut self, value: VALUE) -> &mut Self
The desired size of the four chart margins in backend units (pixels).
Sourcepub fn x_label_area_size<VALUE: Into<u32>>(&mut self, value: VALUE) -> &mut Self
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.
Sourcepub fn y_label_area_size<VALUE: Into<u32>>(&mut self, value: VALUE) -> &mut Self
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.
Sourcepub fn x_spec<VALUE: Into<Range<f64>>>(&mut self, value: VALUE) -> &mut Self
pub fn x_spec<VALUE: Into<Range<f64>>>(&mut self, value: VALUE) -> &mut Self
Specifies the X axis range and data properties
Sourcepub fn y_spec<VALUE: Into<Range<f64>>>(&mut self, value: VALUE) -> &mut Self
pub fn y_spec<VALUE: Into<Range<f64>>>(&mut self, value: VALUE) -> &mut Self
Specifies the Y axis range and data properties
Sourcepub fn size<VALUE: Into<(u32, u32)>>(&mut self, value: VALUE) -> &mut Self
pub fn size<VALUE: Into<(u32, u32)>>(&mut self, value: VALUE) -> &mut Self
Size (width, height) of the plot (pixels)
Sourcepub fn output_path<VALUE: Into<PathBuf>>(&mut self, value: VALUE) -> &mut Self
pub fn output_path<VALUE: Into<PathBuf>>(&mut self, value: VALUE) -> &mut Self
Output file path
Sourcepub fn line_color(&mut self, value: Color) -> &mut Self
pub fn line_color(&mut self, value: Color) -> &mut Self
Line color
Sourcepub fn line_style(&mut self, value: LineStyle) -> &mut Self
pub fn line_style(&mut self, value: LineStyle) -> &mut Self
Line style
Sourcepub fn show_legend(&mut self, value: bool) -> &mut Self
pub fn show_legend(&mut self, value: bool) -> &mut Self
Whether to show legend
Sourcepub fn show_points(&mut self, value: bool) -> &mut Self
pub fn show_points(&mut self, value: bool) -> &mut Self
Whether to show points
Sourcepub fn point_size<VALUE: Into<u32>>(&mut self, value: VALUE) -> &mut Self
pub fn point_size<VALUE: Into<u32>>(&mut self, value: VALUE) -> &mut Self
Size of the points
Sourcepub fn dash_style<VALUE: Into<[u32; 3]>>(&mut self, value: VALUE) -> &mut Self
pub fn dash_style<VALUE: Into<[u32; 3]>>(&mut self, value: VALUE) -> &mut Self
Dash style pattern [dash_length, spacing, stroke_width]
Sourcepub fn dot_style<VALUE: Into<[u32; 2]>>(&mut self, value: VALUE) -> &mut Self
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
Sourcepub fn legend_position(&mut self, value: LegendPosition) -> &mut Self
pub fn legend_position(&mut self, value: LegendPosition) -> &mut Self
Legend position
Sourcepub fn build(&self) -> Result<PlotConfig, PlotConfigBuilderError>
pub fn build(&self) -> Result<PlotConfig, PlotConfigBuilderError>
Trait Implementations§
Source§impl Clone for PlotConfigBuilder
impl Clone for PlotConfigBuilder
Source§fn clone(&self) -> PlotConfigBuilder
fn clone(&self) -> PlotConfigBuilder
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for PlotConfigBuilder
impl RefUnwindSafe for PlotConfigBuilder
impl Send for PlotConfigBuilder
impl Sync for PlotConfigBuilder
impl Unpin for PlotConfigBuilder
impl UnsafeUnpin for PlotConfigBuilder
impl UnwindSafe for PlotConfigBuilder
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
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>
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>
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>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
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
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.