Documentation

Overview

    Package moreland provides color maps for pseudocoloring scalar fields. The color maps are described at http://www.kennethmoreland.com/color-advice/ and in the following publications:

    "Why We Use Bad Color Maps and What You Can Do About It." Kenneth Moreland. In Proceedings of Human Vision and Electronic Imaging (HVEI), 2016. (To appear)

    "Diverging Color Maps for Scientific Visualization." Kenneth Moreland. In Proceedings of the 5th International Symposium on Visual Computing, December 2009. DOI 10.1007/978-3-642-10520-3_9.

    Example

      This Example gives examples of plots using the palettes in this package. The output can be found at https://github.com/gonum/plot/blob/master/palette/moreland/testdata/moreland_golden.png.

      Output:
      
      

      Index

      Examples

      Constants

      This section is empty.

      Variables

      This section is empty.

      Functions

      func BlackBody

      func BlackBody() palette.ColorMap

        BlackBody is a Luminance-class ColorMap based on the colors of black body radiation. Although the colors are inspired by the wavelengths of light from black body radiation, the actual colors used are designed to be perceptually uniform. Colors of the desired brightness and hue are chosen, and then the colors are adjusted such that the luminance is perceptually linear (according to the CIE LAB color space).

        func ExtendedBlackBody

        func ExtendedBlackBody() palette.ColorMap

          ExtendedBlackBody is a Luminance-class ColorMap based on the colors of black body radiation with some blue and purple hues thrown in at the lower end to add some "color." The color map is similar to the default colors used in gnuplot. Colors of the desired brightness and hue are chosen, and then the colors are adjusted such that the luminance is perceptually linear (according to the CIE LAB color space).

          func ExtendedKindlmann

          func ExtendedKindlmann() palette.ColorMap

            ExtendedKindlmann is a Luminance-class ColorMap uses the colors from Kindlmann but also adds more hues by doing a more than 360 degree loop around the hues. This works because the endpoints have low saturation and very different brightness.

            func Kindlmann

            func Kindlmann() palette.ColorMap

              Kindlmann is a Luminance-class ColorMap that uses the colors first proposed in a paper by Kindlmann, Reinhard, and Creem. The map is basically the rainbow color map with the luminance adjusted such that it monotonically changes, making it much more perceptually viable.

              Citation: Gordon Kindlmann, Erik Reinhard, and Sarah Creem. 2002. Face-based luminance matching for perceptual colormap generation. In Proceedings of the conference on Visualization '02 (VIS '02). IEEE Computer Society, Washington, DC, USA, 299-306.

              func NewLuminance

              func NewLuminance(controls []color.Color) (palette.ColorMap, error)

                NewLuminance creates a new Luminance ColorMap from the given controlColors. luminance is a color palette that interpolates between control colors in a way that ensures a linear relationship between the luminance of a color and the value it represents. If the luminance of the controls is not monotonically increasing, an error will be returned.

                func NewSmoothDiverging

                func NewSmoothDiverging(start, end color.Color, convergeM float64) palette.DivergingColorMap

                  NewSmoothDiverging creates a new smooth diverging ColorMap as described in "Diverging Color Maps for Scientific Visualization." by Kenneth Moreland, in Proceedings of the 5th International Symposium on Visual Computing, December 2009. DOI 10.1007/978-3-642-10520-3_9.

                  start and end are the start- and end-point colors and convergeM is the magnitude of the convergence point in magnitude-saturation-hue (MSH) color space. Note that convergeM specifies the color of the convergence point; it does not specify the location of the convergence point.

                  func SmoothBlueRed

                  func SmoothBlueRed() palette.DivergingColorMap

                    SmoothBlueRed is a SmoothDiverging-class ColorMap ranging from blue to red.

                    func SmoothBlueTan

                    func SmoothBlueTan() palette.DivergingColorMap

                      SmoothBlueTan is a SmoothDiverging-class ColorMap ranging from blue to tan.

                      func SmoothGreenPurple

                      func SmoothGreenPurple() palette.DivergingColorMap

                        SmoothGreenPurple is a SmoothDiverging-class ColorMap ranging from green to purple.

                        func SmoothGreenRed

                        func SmoothGreenRed() palette.DivergingColorMap

                          SmoothGreenRed is a SmoothDiverging-class ColorMap ranging from green to red.

                          func SmoothPurpleOrange

                          func SmoothPurpleOrange() palette.DivergingColorMap

                            SmoothPurpleOrange is a SmoothDiverging-class ColorMap ranging from purple to orange.

                            Types

                            This section is empty.