pub struct GuideColourbar {
pub bar_width: Option<f64>,
pub bar_height: Option<f64>,
pub nbin: usize,
pub display: ColourbarDisplay,
pub frame: Option<bool>,
pub ticks: bool,
pub steps: bool,
pub even_steps: bool,
pub show_limits: bool,
}Expand description
Options of a continuous colour / fill legend — ggplot2’s
guide_colourbar(), or guide_coloursteps() when steps is set
(#409). Apply with GGPlot::guide_colourbar.
Fields§
§bar_width: Option<f64>The bar’s horizontal extent in px (barwidth); None = the theme’s
key size (long side 8 keys).
bar_height: Option<f64>The bar’s vertical extent in px (barheight).
nbin: usizeColour samples along the bar (nbin).
display: ColourbarDisplayGradient or separate rectangles (display).
frame: Option<bool>Draw the outline round the bar (frame); None = the theme’s
legend.frame (legend_bar_border).
ticks: boolDraw tick marks at the breaks (ticks).
steps: boolguide_coloursteps(): one solid block per interval between breaks.
even_steps: boolColoursteps: every block the same length (even.steps, default
true), instead of proportional to its value range.
show_limits: boolColoursteps: label the two outer limits too (show.limits).
Implementations§
Source§impl GuideColourbar
impl GuideColourbar
pub fn with_bar_width(self, px: f64) -> Self
pub fn with_bar_height(self, px: f64) -> Self
pub fn with_nbin(self, nbin: usize) -> Self
pub fn with_display(self, display: ColourbarDisplay) -> Self
pub fn with_frame(self, frame: bool) -> Self
pub fn with_ticks(self, ticks: bool) -> Self
pub fn with_even_steps(self, even: bool) -> Self
pub fn with_show_limits(self, show: bool) -> Self
Trait Implementations§
Source§impl Clone for GuideColourbar
impl Clone for GuideColourbar
Source§impl Debug for GuideColourbar
impl Debug for GuideColourbar
Source§impl Default for GuideColourbar
impl Default for GuideColourbar
Source§impl PartialEq for GuideColourbar
impl PartialEq for GuideColourbar
impl StructuralPartialEq for GuideColourbar
Auto Trait Implementations§
impl Freeze for GuideColourbar
impl RefUnwindSafe for GuideColourbar
impl Send for GuideColourbar
impl Sync for GuideColourbar
impl Unpin for GuideColourbar
impl UnsafeUnpin for GuideColourbar
impl UnwindSafe for GuideColourbar
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
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> ⓘ
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