pub struct Aes {
pub mappings: Vec<AesMapping>,
pub after_scale: Vec<AfterScaleSpec>,
}Expand description
Builder for aesthetic mappings.
Fields§
§mappings: Vec<AesMapping>§after_scale: Vec<AfterScaleSpec>Post-scale color derivations (after_scale).
Implementations§
Source§impl Aes
impl Aes
pub fn new() -> Self
Sourcepub fn after_scale_fill_from_color(self, lightness: f64) -> Self
pub fn after_scale_fill_from_color(self, lightness: f64) -> Self
Set fill to the mapped color with adjusted lightness (R’s
aes(fill = after_scale(...))). lightness in -1.0..=1.0: positive
lightens toward white, negative darkens toward black.
Sourcepub fn after_scale_color_from_fill(self, lightness: f64) -> Self
pub fn after_scale_color_from_fill(self, lightness: f64) -> Self
Set color to the mapped fill with adjusted lightness — useful for a
darker border around a filled shape (color = after_scale(darken(fill))).
Sourcepub fn stage(self, aesthetic: Aesthetic, start: &str, after_stat: &str) -> Self
pub fn stage(self, aesthetic: Aesthetic, start: &str, after_stat: &str) -> Self
stage(start, after_stat): map aesthetic from start before the stat
and re-map it from after_stat afterwards (R’s stage()).
pub fn x(self, col: &str) -> Self
pub fn y(self, col: &str) -> Self
pub fn color(self, col: &str) -> Self
pub fn fill(self, col: &str) -> Self
pub fn size(self, col: &str) -> Self
pub fn shape(self, col: &str) -> Self
pub fn alpha(self, col: &str) -> Self
pub fn group(self, col: &str) -> Self
pub fn ymin(self, col: &str) -> Self
pub fn ymax(self, col: &str) -> Self
pub fn label(self, col: &str) -> Self
pub fn weight(self, col: &str) -> Self
pub fn xend(self, col: &str) -> Self
pub fn yend(self, col: &str) -> Self
pub fn xmin(self, col: &str) -> Self
pub fn xmax(self, col: &str) -> Self
pub fn angle(self, col: &str) -> Self
pub fn radius(self, col: &str) -> Self
pub fn linetype(self, col: &str) -> Self
Sourcepub fn after_stat_y(self, col: &str) -> Self
pub fn after_stat_y(self, col: &str) -> Self
Map a stat-computed column to the y aesthetic (e.g., after_stat_y("density")).
Sourcepub fn after_stat_x(self, col: &str) -> Self
pub fn after_stat_x(self, col: &str) -> Self
Map a stat-computed column to the x aesthetic.
Sourcepub fn after_stat_fill(self, col: &str) -> Self
pub fn after_stat_fill(self, col: &str) -> Self
Map a stat-computed column to the fill aesthetic.
Sourcepub fn after_stat_color(self, col: &str) -> Self
pub fn after_stat_color(self, col: &str) -> Self
Map a stat-computed column to the color aesthetic.
Sourcepub fn after_stat_size(self, col: &str) -> Self
pub fn after_stat_size(self, col: &str) -> Self
Map a stat-computed column to the size aesthetic.
Sourcepub fn after_stat_alpha(self, col: &str) -> Self
pub fn after_stat_alpha(self, col: &str) -> Self
Map a stat-computed column to the alpha aesthetic.
Sourcepub fn get_mapping(&self, aes: &Aesthetic) -> Option<&str>
pub fn get_mapping(&self, aes: &Aesthetic) -> Option<&str>
Get the column mapped to a specific aesthetic.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Aes
impl RefUnwindSafe for Aes
impl Send for Aes
impl Sync for Aes
impl Unpin for Aes
impl UnsafeUnpin for Aes
impl UnwindSafe for Aes
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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>
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