pub struct DigitalPlot<'a> { /* private fields */ }Expand description
Builder for digital plots with extensive customization options
Digital plots are used to display digital signals (0/1, high/low, etc.) They do not respond to y drag or zoom, and are always referenced to the bottom of the plot.
Implementations§
Source§impl<'a> DigitalPlot<'a>
impl<'a> DigitalPlot<'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 digital plot with the given label and data
Sourcepub fn with_flags(self, flags: DigitalFlags) -> Self
pub fn with_flags(self, flags: DigitalFlags) -> Self
Set digital flags for customization
Sourcepub fn with_style(self, style: PlotItemStyle) -> Self
pub fn with_style(self, style: PlotItemStyle) -> Self
Set ImPlotSpec-backed style overrides for this digital plot.
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.