pub struct LinePlot<'a> { /* private fields */ }Expand description
Builder for line plots with extensive customization options
Implementations§
Source§impl<'a> LinePlot<'a>
impl<'a> LinePlot<'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 line 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 line plot.
Sourcepub fn with_line_color(self, color: [f32; 4]) -> Self
pub fn with_line_color(self, color: [f32; 4]) -> Self
Set the line color. Use the alpha channel to control line transparency.
Sourcepub fn with_line_weight(self, weight: f32) -> Self
pub fn with_line_weight(self, weight: f32) -> Self
Set the line width in pixels.
Sourcepub fn with_fill_color(self, color: [f32; 4]) -> Self
pub fn with_fill_color(self, color: [f32; 4]) -> Self
Set the fill color used when the line is rendered with shaded fill.
Sourcepub fn with_fill_alpha(self, alpha: f32) -> Self
pub fn with_fill_alpha(self, alpha: f32) -> Self
Set the fill alpha multiplier used for shaded regions and marker faces.
Sourcepub fn with_marker(self, marker: Marker) -> Self
pub fn with_marker(self, marker: Marker) -> Self
Set the marker type for the line 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: LineFlags) -> Self
pub fn with_flags(self, flags: LineFlags) -> Self
Set line 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_data_layout(self, layout: PlotDataLayout) -> Self
pub fn with_data_layout(self, layout: PlotDataLayout) -> Self
Set the data layout used to read X/Y samples.
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 fn with_stride(self, stride: PlotDataStride) -> Self
pub fn with_stride(self, stride: PlotDataStride) -> Self
Set the byte stride used to read X/Y samples.