pub enum Mode {
Lines,
Markers,
Text,
LinesMarkers,
LinesText,
MarkersText,
LinesMarkersText,
None,
}Expand description
An enumeration representing different drawing modes for scatter-type plots.
The Mode enum specifies how data points should be displayed in plots like
scatter plots, line plots, and polar scatter plots.
§Example
use plotlars::{Line, Mode, Plot, Rgb, ScatterPolar, Shape, Text};
use polars::prelude::*;
// Create sample data - radar chart style
let categories = vec![0., 72., 144., 216., 288., 360.];
let performance = vec![8.0, 6.5, 7.0, 9.0, 5.5, 8.0];
let dataset = DataFrame::new(categories.len(), vec![
Column::new("category".into(), categories),
Column::new("performance".into(), performance),
])
.unwrap();
ScatterPolar::builder()
.data(&dataset)
.theta("category")
.r("performance")
.mode(Mode::LinesMarkers)
.color(Rgb(255, 0, 0))
.shape(Shape::Diamond)
.line(Line::Solid)
.width(3.0)
.size(12)
.opacity(0.8)
.plot_title(
Text::from("Performance Radar Chart")
.font("Arial")
.size(22)
.x(0.5)
)
.build()
.plot();
Variants§
Lines
Draw only lines connecting the data points
Markers
Draw only markers at each data point
Text
Draw only text labels at each data point
LinesMarkers
Draw both lines and markers
LinesText
Draw both lines and text labels
MarkersText
Draw both markers and text labels
LinesMarkersText
Draw lines, markers, and text labels
None
Do not draw any visual elements (useful for invisible traces)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Mode
impl RefUnwindSafe for Mode
impl Send for Mode
impl Sync for Mode
impl Unpin for Mode
impl UnwindSafe for Mode
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more