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 unsafe fn with_data_layout(self, layout: PlotDataLayout) -> Self
pub unsafe fn with_data_layout(self, layout: PlotDataLayout) -> Self
Set the data layout used to read X/Y samples.
§Safety
Every sample address computed from layout must refer to an initialized, properly aligned
f64 within both coordinate allocations retained by this builder.
Sourcepub fn with_offset(self, offset: PlotDataOffset) -> Self
pub fn with_offset(self, offset: PlotDataOffset) -> Self
Set the sample-index offset used to read X/Y samples.
Sourcepub unsafe fn with_stride(self, stride: PlotDataStride) -> Self
pub unsafe fn with_stride(self, stride: PlotDataStride) -> Self
Set the byte stride used to read X/Y samples.
§Safety
Every strided sample read must remain initialized, aligned, and within both coordinate allocations retained by this builder.