deephaven.Plot.ColorMaps¶
Functions for mapping between values and Colors or Paints.
-
heatMap
(*args)¶ Returns a heat map to map numerical values to colors.
Values less than or equal to min return the starting color. Values greater than or equal to max return the ending color. Values in between this range are a linear combination of the RGB components of these two colors. Higher values return colors that are closer to the ending color, and lower values return colors that are closer to the starting color.
Inputs that are null or Double.NaN return a null color.
- Overload 1
- param min
(double) - minimum
- param max
(double) - maximum
- return
(java.util.function.Function<java.lang.Double,com.illumon.iris.gui.color.Color>) function for mapping double values to colors. The starting color is blue (#0000FF) and the ending color is yellow (#FFFF00).
- Overload 2
- param min
(double) - minimum
- param max
(double) - maximum
- param startColor
(com.illumon.iris.gui.color.Color) - color at values less than or equal to min
- param endColor
(com.illumon.iris.gui.color.Color) - color at values greater than or equal to max
- return
(java.util.function.Function<java.lang.Double,com.illumon.iris.gui.color.Color>) function for mapping double values to colors
- Overload 3
- param min
(double) - minimum
- param max
(double) - maximum
- param startColor
(com.illumon.iris.gui.color.Color) - color at values less than or equal to min
- param endColor
(com.illumon.iris.gui.color.Color) - color at values greater than or equal to max
- param nullColor
(com.illumon.iris.gui.color.Color) - color at null input values
- return
(java.util.function.Function<java.lang.Double,com.illumon.iris.gui.color.Color>) function for mapping double values to colors
-
predicateMap
(*args)¶ - Returns a function which uses predicate functions to determine which colors is returned for an input value.
For each input value, a map is iterated through until the predicate function (map key) returns true. When the predicate returns true, the associated color (map value) is returned. If no such predicate is found, an out of range color is returned.
- Overload 1
Note: Java generics information - <COLOR extends com.illumon.iris.gui.color.Paint>
- param map
java.util.Map<com.illumon.iris.db.plot.colors.ColorMaps.SerializablePredicate<java.lang.Double>,COLOR>
- return
(java.util.function.Function<java.lang.Double,com.illumon.iris.gui.color.Paint>) function which returns the color mapped to the first ColorMaps.SerializablePredicate for which the input is true. Out of range, null, and NaN values return null.
- Overload 2
Note: Java generics information - <COLOR extends com.illumon.iris.gui.color.Paint>
- param map
java.util.Map<com.illumon.iris.db.plot.colors.ColorMaps.SerializablePredicate<java.lang.Double>,COLOR>
- param outOfRangeColor
com.illumon.iris.gui.color.Color
- return
(java.util.function.Function<java.lang.Double,com.illumon.iris.gui.color.Paint>) function which returns the color mapped to the first ColorMaps.SerializablePredicate for which the input is true. Null and NaN inputs return null.
- Overload 3
Note: Java generics information - <COLOR extends com.illumon.iris.gui.color.Paint>
- param map
java.util.Map<com.illumon.iris.db.plot.colors.ColorMaps.SerializablePredicate<java.lang.Double>,COLOR>
- param outOfRangeColor
com.illumon.iris.gui.color.Paint
- param nullColor
com.illumon.iris.gui.color.Paint
- return
(java.util.function.Function<java.lang.Double,com.illumon.iris.gui.color.Paint>) function which returns the color mapped to the first ColorMaps.SerializablePredicate for which the input is true
-
rangeMap
(*args)¶ - Maps Ranges of values to specific colors.
Values inside a given Range return the corresponding Paint.
Values not in any of the specified Range return an out of range color. Null inputs return a null color.
- Overload 1
Note: Java generics information - <COLOR extends com.illumon.iris.gui.color.Paint>
- param map
java.util.Map<com.illumon.numerics.util.Range,COLOR>
- return
(java.util.function.Function<java.lang.Double,com.illumon.iris.gui.color.Paint>) function for mapping double values to colors. Null and out of range values return null.
- Overload 2
Note: Java generics information - <COLOR extends com.illumon.iris.gui.color.Paint>
- param map
java.util.Map<com.illumon.numerics.util.Range,COLOR>
- param outOfRangeColor
com.illumon.iris.gui.color.Color
- return
(java.util.function.Function<java.lang.Double,com.illumon.iris.gui.color.Paint>) function for mapping double values to colors. Null values return null.
- Overload 3
Note: Java generics information - <COLOR extends com.illumon.iris.gui.color.Paint>
- param map
java.util.Map<com.illumon.numerics.util.Range,COLOR>
- param outOfRangeColor
com.illumon.iris.gui.color.Paint
- param nullColor
com.illumon.iris.gui.color.Paint
- return
(java.util.function.Function<java.lang.Double,com.illumon.iris.gui.color.Paint>) function for mapping double values to colors