pub struct Axes {Show 16 fields
pub plots: Vec<Plot>,
pub custom_svg_elements: Vec<String>,
pub x_label: Option<String>,
pub y_label: Option<String>,
pub title: Option<String>,
pub x_limits: Option<(f64, f64)>,
pub y_limits: Option<(f64, f64)>,
pub grid: bool,
pub legend: bool,
pub background_color: Color,
pub grid_color: Color,
pub text_color: Color,
pub font_size: f64,
pub show_x_axis: bool,
pub show_y_axis: bool,
pub equal_aspect: bool,
}Expand description
Represents a set of axes for plotting
Fields§
§plots: Vec<Plot>§custom_svg_elements: Vec<String>§x_label: Option<String>§y_label: Option<String>§title: Option<String>§x_limits: Option<(f64, f64)>§y_limits: Option<(f64, f64)>§grid: bool§legend: bool§background_color: Color§grid_color: Color§text_color: Color§font_size: f64§show_x_axis: bool§show_y_axis: bool§equal_aspect: boolImplementations§
Source§impl Axes
impl Axes
Sourcepub fn pie(&mut self, values: &[f64], labels: Option<&[String]>) -> &mut Self
pub fn pie(&mut self, values: &[f64], labels: Option<&[String]>) -> &mut Self
Add a pie chart to the plot
Sourcepub fn contour(&mut self, x: &[f64], y: &[f64], z: &[Vec<f64>]) -> &mut Self
pub fn contour(&mut self, x: &[f64], y: &[f64], z: &[Vec<f64>]) -> &mut Self
Add a contour plot
Sourcepub fn add_svg_element(&mut self, svg_element: String)
pub fn add_svg_element(&mut self, svg_element: String)
Add custom SVG element
Sourcepub fn set_xlabel(&mut self, label: &str) -> &mut Self
pub fn set_xlabel(&mut self, label: &str) -> &mut Self
Set the x-axis label
Sourcepub fn set_ylabel(&mut self, label: &str) -> &mut Self
pub fn set_ylabel(&mut self, label: &str) -> &mut Self
Set the y-axis label
Sourcepub fn show_x_axis(&mut self, show: bool) -> &mut Self
pub fn show_x_axis(&mut self, show: bool) -> &mut Self
Enable or disable x-axis display
Sourcepub fn show_y_axis(&mut self, show: bool) -> &mut Self
pub fn show_y_axis(&mut self, show: bool) -> &mut Self
Enable or disable y-axis display
Sourcepub fn equal_aspect(&mut self, enable: bool) -> &mut Self
pub fn equal_aspect(&mut self, enable: bool) -> &mut Self
Enable or disable equal aspect ratio (same scale for x and y axes)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Axes
impl RefUnwindSafe for Axes
impl Send for Axes
impl Sync for Axes
impl Unpin for Axes
impl UnwindSafe for Axes
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