Class ContourPlot.SimpleColorMap

    • Field Detail

      • colors

        protected int[] colors
      • locations

        protected double[] locations
    • Constructor Detail

      • SimpleColorMap

        public SimpleColorMap​(int[] colors,
                              double[] locations)
        Creates a ContourPlot.SimpleColorMap with the specified colors and corresponding locations in the unit interval. As required by the ContourPlot.ColorMap interface the first location has to be 0, the last location has to 1 and the locations in between have to monotonically increase within ]0,1[.
        Parameters:
        colors - integer packed ARGB values (e.g. 0xff00ff00 is opaque green)
        locations - corresponding to colors. Within [0,1].
        Throws:
        java.lang.IllegalArgumentException - if colors and locations are of different lengths, if less than 2 colors are specified, if locations does not start with 0 or does not end with 1, if locations is not sorted in ascending order.
      • SimpleColorMap

        public SimpleColorMap​(int... colors)
        Creates a new ContourPlot.SimpleColorMap with the specified colors and uniform spacing.
        Parameters:
        colors - integer packed ARGB values (e.g. 0xff00ff00 is opaque green)
        Throws:
        java.lang.IllegalArgumentException - when less than 2 colors are specified.