Enum gnuplot::PaletteType
source · pub enum PaletteType<T> {
Gray(f32),
Formula(i32, i32, i32),
CubeHelix(f32, f32, f32, f32),
Custom(T),
}
Expand description
Specifies what sort of palette to use
Variants§
Gray(f32)
Use a gray palette with a specified gamma
Formula(i32, i32, i32)
Use a palette with that uses a predefined formula for each color component. Each formula is identified by an integer between [-36, 36]. See gnuplot documentation, or use the pre-defined constants.
CubeHelix(f32, f32, f32, f32)
Use a cube helix palette, with a certain start (in radians), cycles, saturation and gamma.
Custom(T)
A custom palette is specified by a sequence of 4-tuples (with at least one element). The first element is the grayscale value that is mapped to the remaining three elements which specify the red, green and blue components of the color. The grayscale values must be non-decreasing. All values must range from 0 to 1.
Trait Implementations§
source§impl<T: Clone> Clone for PaletteType<T>
impl<T: Clone> Clone for PaletteType<T>
source§fn clone(&self) -> PaletteType<T>
fn clone(&self) -> PaletteType<T>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<T: Debug> Debug for PaletteType<T>
impl<T: Debug> Debug for PaletteType<T>
source§impl<T: PartialEq> PartialEq<PaletteType<T>> for PaletteType<T>
impl<T: PartialEq> PartialEq<PaletteType<T>> for PaletteType<T>
source§fn eq(&self, other: &PaletteType<T>) -> bool
fn eq(&self, other: &PaletteType<T>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<T: PartialOrd> PartialOrd<PaletteType<T>> for PaletteType<T>
impl<T: PartialOrd> PartialOrd<PaletteType<T>> for PaletteType<T>
source§fn partial_cmp(&self, other: &PaletteType<T>) -> Option<Ordering>
fn partial_cmp(&self, other: &PaletteType<T>) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl<T> StructuralPartialEq for PaletteType<T>
Auto Trait Implementations§
impl<T> RefUnwindSafe for PaletteType<T>where T: RefUnwindSafe,
impl<T> Send for PaletteType<T>where T: Send,
impl<T> Sync for PaletteType<T>where T: Sync,
impl<T> Unpin for PaletteType<T>where T: Unpin,
impl<T> UnwindSafe for PaletteType<T>where T: UnwindSafe,
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