pub enum NumberColormap {
Continuous {
range: NumberRange,
gradient: Array<Gradient>,
},
Discrete {
boundaries: Array<Boundary>,
gradient: Array<Gradient>,
},
}
Expand description
Describes a mapping of floating-point value to colors.
Variants§
Continuous
A continuous colormap linearly samples a color gradient within a defined range.
A value X% of way between min
and max
should use the color from X% way down
gradient. When that X doesn’t land directly on a color use the average of
the colors on either side, inverse-weighted by the distance to each.
Values below the minimum use the first color in the gradient array. Values above the maximum use the last.
Fields
§
range: NumberRange
Value range.
Discrete
A discrete colormap divides the number line into adjacent but non-overlapping ranges and gives a flat color to each range.
Values above the last boundary use end_color
.
Trait Implementations§
Source§impl Clone for NumberColormap
impl Clone for NumberColormap
Source§fn clone(&self) -> NumberColormap
fn clone(&self) -> NumberColormap
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 Debug for NumberColormap
impl Debug for NumberColormap
Source§impl<'de> Deserialize<'de> for NumberColormap
impl<'de> Deserialize<'de> for NumberColormap
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl JsonSchema for NumberColormap
impl JsonSchema for NumberColormap
Source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref
keyword. Read moreSource§impl PartialEq for NumberColormap
impl PartialEq for NumberColormap
Source§impl Serialize for NumberColormap
impl Serialize for NumberColormap
Source§impl Validate for NumberColormap
impl Validate for NumberColormap
impl StructuralPartialEq for NumberColormap
Auto Trait Implementations§
impl Freeze for NumberColormap
impl RefUnwindSafe for NumberColormap
impl Send for NumberColormap
impl Sync for NumberColormap
impl Unpin for NumberColormap
impl UnwindSafe for NumberColormap
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