pub struct DatasetPlot<'a> { /* private fields */ }Expand description
A plot builder over two numeric dataset columns.
Implementations§
Source§impl<'a> DatasetPlot<'a>
impl<'a> DatasetPlot<'a>
Sourcepub fn new(
data: &'a Dataset,
x: impl Into<String>,
y: Option<impl Into<String>>,
) -> Self
pub fn new( data: &'a Dataset, x: impl Into<String>, y: Option<impl Into<String>>, ) -> Self
A line plot over x and y.
Sourcepub fn color_by(self, column: impl Into<String>) -> Self
pub fn color_by(self, column: impl Into<String>) -> Self
Split the series by a text/category column.
Sourcepub fn rows_in(&self, bounds: Bounds) -> Vec<usize>
pub fn rows_in(&self, bounds: Bounds) -> Vec<usize>
The rows whose x and y values fall inside bounds.
Sourcepub fn with_rows(self, rows: impl IntoIterator<Item = usize>) -> Self
pub fn with_rows(self, rows: impl IntoIterator<Item = usize>) -> Self
Show only rows of the dataset.
Sourcepub fn show_linked(
self,
ui: &mut Ui,
icons: &mut Icons,
state: &mut PlotState,
hub: &mut LinkHub,
) -> PlotResponse
pub fn show_linked( self, ui: &mut Ui, icons: &mut Icons, state: &mut PlotState, hub: &mut LinkHub, ) -> PlotResponse
Show the plot and publish its brush to a selection bus.
Auto Trait Implementations§
impl<'a> Forget for DatasetPlot<'a>
impl<'a> Freeze for DatasetPlot<'a>
impl<'a> Move for DatasetPlot<'a>
impl<'a> RefUnwindSafe for DatasetPlot<'a>
impl<'a> Send for DatasetPlot<'a>
impl<'a> Sync for DatasetPlot<'a>
impl<'a> Unpin for DatasetPlot<'a>
impl<'a> UnsafeUnpin for DatasetPlot<'a>where
&'a Dataset: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<usize>: UnsafeUnpin,
impl<'a> UnwindSafe for DatasetPlot<'a>
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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