pub enum AxisCollect {
Keep,
Align,
CollectX,
}Expand description
How a PlotGrid aligns its own direct cells’ plot areas and x scale
within each column (patchwork’s plot_layout(axes = ...), applied to
the x axis and plot-area alignment specifically — sipemu/
ggplot-rs#175, tracked from DataZooDE/anofox-visualization#318). Only a
column of GridCell::Plot cells participates; a GridCell::Spacer
or a nested PlotGrid cell keeps its own layout, and a column with
fewer than two plot cells is a no-op. Set via PlotGrid::axis_collect.
Variants§
Keep
Each cell keeps its own margins, x axis and x domain (default).
Align
Equal left/right plot-area insets within each column, from the
widest y-axis label requirement in that column — the same idea as
anofox-visualization’s track.rs left = max(...) fallback, done
here as one layout pass (GGPlot::layout_built’s own arithmetic)
rather than a render-measure-render loop. Every cell in the column
also switches to AxisLabelFit::Shift
so an overflowing outer tick label can never perturb the alignment.
A cell set thinner than the plotting engine’s 50px panel-height
floor via PlotGrid::heights (an
anofox-visualization ::TRACK strip, typically 16-30px) gets a
centred aspect_ratio instead, so its panel comes out exactly as
tall as the cell rather than overflowing it — track.rs’s own
Fit::correct aspect trick, computed from the same layout pass.
Domains and axis text are otherwise untouched.
CollectX
Align, plus one x domain shared across the column
— the union of every cell’s own trained x domain — with x-axis
ticks/title/labels drawn only on the bottom cell. Skipped (with a
warning), for a column whose x scale is discrete or untrained on
any cell, in which case the column still gets Align’s
plot-area alignment.
Trait Implementations§
Source§impl Clone for AxisCollect
impl Clone for AxisCollect
impl Copy for AxisCollect
Source§impl Debug for AxisCollect
impl Debug for AxisCollect
Source§impl Default for AxisCollect
impl Default for AxisCollect
impl Eq for AxisCollect
Source§impl PartialEq for AxisCollect
impl PartialEq for AxisCollect
impl StructuralPartialEq for AxisCollect
Auto Trait Implementations§
impl Freeze for AxisCollect
impl RefUnwindSafe for AxisCollect
impl Send for AxisCollect
impl Sync for AxisCollect
impl Unpin for AxisCollect
impl UnsafeUnpin for AxisCollect
impl UnwindSafe for AxisCollect
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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