pub struct BoxPlot { /* private fields */ }Expand description
A diagram containing a series of BoxElem elements.
Implementations§
Source§impl BoxPlot
impl BoxPlot
Sourcepub fn new(boxes: Vec<BoxElem>) -> BoxPlot
pub fn new(boxes: Vec<BoxElem>) -> BoxPlot
Create a plot containing multiple boxes. It defaults to vertically oriented elements.
Sourcepub fn color(self, color: impl Into<Color32>) -> BoxPlot
pub fn color(self, color: impl Into<Color32>) -> BoxPlot
Set the default color. It is set on all elements that do not already have a specific color.
This is the color that shows up in the legend.
It can be overridden at the element level (see BoxElem).
Default is Color32::TRANSPARENT which means a color will be auto-assigned.
Sourcepub fn name(self, name: impl ToString) -> BoxPlot
pub fn name(self, name: impl ToString) -> BoxPlot
Name of this box plot diagram.
This name will show up in the plot legend, if legends are turned on. Multiple series may share the same name, in which case they will also share an entry in the legend.
Sourcepub fn vertical(self) -> BoxPlot
pub fn vertical(self) -> BoxPlot
Set all elements to be in a vertical orientation. Argument axis will be X and values will be on the Y axis.
Sourcepub fn horizontal(self) -> BoxPlot
pub fn horizontal(self) -> BoxPlot
Set all elements to be in a horizontal orientation. Argument axis will be Y and values will be on the X axis.
Trait Implementations§
Source§impl PlotItem for BoxPlot
impl PlotItem for BoxPlot
fn shapes(&self, _ui: &Ui, transform: &PlotTransform, shapes: &mut Vec<Shape>)
Source§fn initialize(&mut self, _x_range: RangeInclusive<f64>)
fn initialize(&mut self, _x_range: RangeInclusive<f64>)
fn name(&self) -> &str
fn color(&self) -> Color32
fn highlight(&mut self)
fn highlighted(&self) -> bool
fn geometry(&self) -> PlotGeometry<'_>
fn bounds(&self) -> PlotBounds
fn find_closest( &self, point: Pos2, transform: &PlotTransform, ) -> Option<ClosestElem>
fn on_hover( &self, elem: ClosestElem, shapes: &mut Vec<Shape>, cursors: &mut Vec<Cursor>, plot: &PlotConfig<'_>, _: &Option<Box<dyn Fn(&str, &PlotPoint) -> String>>, )
fn id(&self) -> Option<Id>
Auto Trait Implementations§
impl Freeze for BoxPlot
impl !RefUnwindSafe for BoxPlot
impl !Send for BoxPlot
impl !Sync for BoxPlot
impl Unpin for BoxPlot
impl !UnwindSafe for BoxPlot
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
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
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> ⓘ
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> ⓘ
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