LinePlot
Builder for creating line plots that connect (x, y) data points with a continuous line. Supports multiple line styles, filled area regions, step interpolation, confidence bands, and error bars.Constructor
Create a line plot with default settings.Defaults:
- Color:
"black" - Stroke width:
2.0pixels - Line style:
LineStyle::Solid - No fill
- No step interpolation
Data Methods
(T, U) pairs where T and U implement Into<f64>, so integer and float types all work without casting.Example:with_data.(negative_arm, positive_arm) tuple. Must be called after with_data.with_data.(negative_arm, positive_arm) tuple. Must be called after with_data.Styling Methods
"steelblue", "#4477aa").2.0).LineStyle::Dashed (dasharray 8 4).LineStyle::Dotted (dasharray 2 4).LineStyle::DashDot (dasharray 8 4 2 4).Interpolation & Fill Methods
with_fill_opacity (default 0.3).0.3). Has no effect unless with_fill is also called.Band & Legend Methods
y_lower and y_upper must have the same length as the data. The band color matches the line color at 30% opacity.Example:Enums & Types
LineStyle
Stroke style for a line plot. Default isSolid.
Solid- Solid continuous line (default)Dashed- Dashed line (dasharray8 4)Dotted- Dotted line (dasharray2 4)DashDot- Dash-dot line (dasharray8 4 2 4)Custom(String)- Arbitrary SVGstroke-dasharrayvalue (e.g."10 5 2 5")