pub struct ScatterPlot<'a> { /* private fields */ }Expand description
Builder for scatter plots with customization options
Implementations§
Source§impl<'a> ScatterPlot<'a>
impl<'a> ScatterPlot<'a>
Sourcepub fn new(label: &'a str, x_data: &'a [f64], y_data: &'a [f64]) -> Self
pub fn new(label: &'a str, x_data: &'a [f64], y_data: &'a [f64]) -> Self
Create a new scatter plot with the given label and data
Sourcepub fn with_style(self, style: PlotItemStyle) -> Self
pub fn with_style(self, style: PlotItemStyle) -> Self
Replace the entire item style override for this scatter plot.
Sourcepub fn with_line_color(self, color: [f32; 4]) -> Self
pub fn with_line_color(self, color: [f32; 4]) -> Self
Set the scatter line color. Use the alpha channel to control transparency.
Sourcepub fn with_line_weight(self, weight: f32) -> Self
pub fn with_line_weight(self, weight: f32) -> Self
Set the outline width in pixels.
Sourcepub fn with_marker(self, marker: Marker) -> Self
pub fn with_marker(self, marker: Marker) -> Self
Set the marker type for the scatter plot.
Sourcepub fn with_marker_size(self, size: f32) -> Self
pub fn with_marker_size(self, size: f32) -> Self
Set the marker size in pixels.
Sourcepub fn with_marker_line_color(self, color: [f32; 4]) -> Self
pub fn with_marker_line_color(self, color: [f32; 4]) -> Self
Set the marker outline color.
Sourcepub fn with_marker_fill_color(self, color: [f32; 4]) -> Self
pub fn with_marker_fill_color(self, color: [f32; 4]) -> Self
Set the marker fill color.
Sourcepub fn with_flags(self, flags: ScatterFlags) -> Self
pub fn with_flags(self, flags: ScatterFlags) -> Self
Set scatter flags for customization
Sourcepub fn with_item_flags(self, flags: ItemFlags) -> Self
pub fn with_item_flags(self, flags: ItemFlags) -> Self
Set common item flags for this plot item (applies to all plot types)
Sourcepub fn with_offset(self, offset: i32) -> Self
pub fn with_offset(self, offset: i32) -> Self
Set data offset for partial plotting
Sourcepub fn with_stride(self, stride: i32) -> Self
pub fn with_stride(self, stride: i32) -> Self
Set data stride for non-contiguous data
Trait Implementations§
Source§impl<'a> Plot for ScatterPlot<'a>
impl<'a> Plot for ScatterPlot<'a>
Source§impl<'a> PlotItemStyled for ScatterPlot<'a>
impl<'a> PlotItemStyled for ScatterPlot<'a>
fn style_mut(&mut self) -> &mut PlotItemStyle
Source§fn with_style(self, style: PlotItemStyle) -> Self
fn with_style(self, style: PlotItemStyle) -> Self
Replace the entire item style override for this plot.
Source§fn with_line_color(self, color: [f32; 4]) -> Self
fn with_line_color(self, color: [f32; 4]) -> Self
Set the line color. Use the alpha channel to control line transparency.
Source§fn with_line_weight(self, weight: f32) -> Self
fn with_line_weight(self, weight: f32) -> Self
Set the line width in pixels.
Source§fn with_fill_color(self, color: [f32; 4]) -> Self
fn with_fill_color(self, color: [f32; 4]) -> Self
Set the fill color.
Source§fn with_fill_alpha(self, alpha: f32) -> Self
fn with_fill_alpha(self, alpha: f32) -> Self
Set the fill alpha multiplier used for fills and marker faces.
Source§fn with_marker(self, marker: Marker) -> Self
fn with_marker(self, marker: Marker) -> Self
Set the marker type.
Source§fn with_marker_size(self, size: f32) -> Self
fn with_marker_size(self, size: f32) -> Self
Set the marker size in pixels.
Source§fn with_marker_line_color(self, color: [f32; 4]) -> Self
fn with_marker_line_color(self, color: [f32; 4]) -> Self
Set the marker outline color.
Source§fn with_marker_fill_color(self, color: [f32; 4]) -> Self
fn with_marker_fill_color(self, color: [f32; 4]) -> Self
Set the marker fill color.
Auto Trait Implementations§
impl<'a> Freeze for ScatterPlot<'a>
impl<'a> RefUnwindSafe for ScatterPlot<'a>
impl<'a> Send for ScatterPlot<'a>
impl<'a> Sync for ScatterPlot<'a>
impl<'a> Unpin for ScatterPlot<'a>
impl<'a> UnsafeUnpin for ScatterPlot<'a>
impl<'a> UnwindSafe for ScatterPlot<'a>
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