pub struct PlotData {
pub x: Array1<f64>,
pub y: Array1<f64>,
pub z: Option<Array1<f64>>,
pub colors: Option<Array1<f64>>,
pub sizes: Option<Array1<f64>>,
pub labels: Option<Vec<String>>,
pub additional_dims: Option<Array2<f64>>,
}Expand description
Plot data structure
Fields§
§x: Array1<f64>X coordinates
y: Array1<f64>Y coordinates
z: Option<Array1<f64>>Z coordinates (for 3D plots)
colors: Option<Array1<f64>>Point colors (indices into color scheme)
sizes: Option<Array1<f64>>Point sizes
labels: Option<Vec<String>>Point labels for tooltips
additional_dims: Option<Array2<f64>>Additional data dimensions for parallel coordinates
Implementations§
Source§impl PlotData
impl PlotData
Sourcepub fn new(x: Array1<f64>, y: Array1<f64>) -> Self
pub fn new(x: Array1<f64>, y: Array1<f64>) -> Self
Create new plot data with x and y coordinates
Sourcepub fn with_colors(self, colors: Array1<f64>) -> Self
pub fn with_colors(self, colors: Array1<f64>) -> Self
Add colors for points
Sourcepub fn with_sizes(self, sizes: Array1<f64>) -> Self
pub fn with_sizes(self, sizes: Array1<f64>) -> Self
Add sizes for points
Sourcepub fn with_labels(self, labels: Vec<String>) -> Self
pub fn with_labels(self, labels: Vec<String>) -> Self
Add labels for tooltips
Sourcepub fn with_additional_dims(self, dims: Array2<f64>) -> Self
pub fn with_additional_dims(self, dims: Array2<f64>) -> Self
Add additional dimensions for parallel coordinates
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PlotData
impl RefUnwindSafe for PlotData
impl Send for PlotData
impl Sync for PlotData
impl Unpin for PlotData
impl UnwindSafe for PlotData
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> 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