pub struct PairPlot { /* private fields */ }Expand description
A scatterplot matrix.
Implementations§
Source§impl PairPlot
impl PairPlot
Sourcepub fn new(columns: Vec<Vec<f64>>, labels: Vec<String>) -> Self
pub fn new(columns: Vec<Vec<f64>>, labels: Vec<String>) -> Self
Build from columns (one slice per variable, all the same length) and
their labels. Panics-free: mismatched lengths are simply reflected in
the empty result of PairPlot::draw (which returns Ok(()) when there
is nothing coherent to plot).
Sourcepub fn marker_radius(self, radius: u32) -> Self
pub fn marker_radius(self, radius: u32) -> Self
Set the scatter marker radius in pixels.
Sourcepub fn hue(self, groups: Vec<usize>) -> Self
pub fn hue(self, groups: Vec<usize>) -> Self
Color scatter points by a per-observation group index (its length should match the column length). Colors cycle the shared palette.
Sourcepub fn draw<DB: DrawingBackend>(
&self,
area: &DrawingArea<DB, Shift>,
) -> Result<(), Box<dyn Error>>where
DB::ErrorType: 'static,
pub fn draw<DB: DrawingBackend>(
&self,
area: &DrawingArea<DB, Shift>,
) -> Result<(), Box<dyn Error>>where
DB::ErrorType: 'static,
Render the matrix onto area.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PairPlot
impl RefUnwindSafe for PairPlot
impl Send for PairPlot
impl Sync for PairPlot
impl Unpin for PairPlot
impl UnsafeUnpin for PairPlot
impl UnwindSafe for PairPlot
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