ptvis.color.BaseNumericalColorConversion¶
- class ptvis.color.BaseNumericalColorConversion(colors=None, levels=None, value_min=None, value_max=None, lower_color=None, higher_color=None, na_color='#444444')[source]¶
Bases:
BaseColorConversionBase color conversion from numerical values.
- Parameters:
colors (array-like of
str, optional) – Colors defining a color scale.levels (array-like of
float, optional) – Levels defining a color scale. Must be in ascending order. If not given, evenly spaced levels are used.value_min (
float, optional) – Value corresponding with the lowest level.value_max (
float, optional) – Value corresponding with the highest level.lower_color (
str, optional) – Color for values lower than the domain.higher_color (
str, optional) – Color for values higher than the domain.na_color (
str, optional) – Color for NaN.
Attributes
Colors defining a color scale.
Color for values higher than the domain.
Levels defining a color scale.
Color for values lower than the domain.
Color for NaN.
Value corresponding to the highest level.
Value corresponding to the lowest level.
Methods
apply(values)Apply the conversion to values.
color_guide(values[, attrs])Give a color guide.
domain(values)Give a domain of the conversion.