You are on page 1of 5

COMMENTARY

True Colors of Oceanography


Guidelines for Effective and Accurate Colormap Selection
By Kristen M. Thyng, Chad A. Greene, Robert D. Hetland, Heather M. Zimmerle, and Steven F. DiMarco

Data graphics shape the way science is data being represented. One common data appear to have sharp edges and broad
communicated, and the color schemes colormap that is perceived in false rela- plateaus when plotted with jet. A com-
we employ can either faithfully repre- tion to the data it represents is the mon argument in favor of jet is that its
sent or tacitly obscure the data a fig- rainbow-colored jet colormap, whose sharp gradients allow proximal colors to
ure is intended to convey (Tufte, 1983). popularity stems largely from its decades- be distinguished by a meticulous viewer,
Tasteful use of color can make data long residence as the default setting in and indeed, Figure 1c shows that in some
graphics visually appealing and can draw MATLAB and similar programs (Eddins, subranges within the color scale, jet offers
viewers in, engaging the audience and 2014). The jet colormap visually distorts superior point-to-point discrimination.
encouraging further inspection of a fig- information through two primary mech- However, the high-performing regions of
ure. But wherever color is used to rep- anisms. First, jet places emphasis at arbi- jet are offset by regions elsewhere in the
resent numerical values, its role tran- trary locations along the color scale cor- spectrum where changes of the same size
sitions from a mere aesthetic nicety to responding to local maxima and minima are nearly imperceptible.
carrying the responsibility of conveying in colormap lightness (Rappaport, 2002;
data honestly and accurately. Yet, biases Stauffer et  al., 2015). This effect leads to HOW TO SELECT AN HONEST,
introduced by some common colormaps higher rates of error in identifying regions EFFECTIVE COLORMAP
have gone widely unrecognized within of maximum and minimum data val- To avoid the pitfalls of jet and other per-
the oceanographic community. Here, we ues, even among experts who are familiar ceptually nonuniform colormaps, we
describe the pitfalls of some commonly with the data type under evaluation and offer the following guidelines for select-
used colormaps, provide guidelines on who have experience with jet colormap ing data-appropriate colormaps that
effective, accurate colormap selection, (Spence et  al., 1999; Borkin et  al., 2011; show numerical values effectively, intui-
and present a suite of perceptually uni- Bryant et al., 2014). tively, and in proper proportion.
form cmocean colormaps that have been The second mechanism by which jet
designed for oceanographic data display. deceives viewers is through false gradients Reflect the Nature of the Data
The cmocean package is available across introduced by a non-monotonic light- The first step in selecting an appropri-
multiple software programs, including ness profile, which accelerates at a differ- ate colormap relates to the nature of
MATLAB, Python, R, Generic Mapping ent rate than the data it represents (Light the data being displayed. Numerical
Tools, and Ocean Data Viewer. and Bartlein, 2004; Borland and Taylor II, data represented by pseudocolor can
2007). For oceanographers, the danger of typically be categorized as sequential,
RAINBOW DECEPTION jet’s false gradient profile is its ability to diverging, or cyclic.
When color is employed to show numer- covertly exaggerate fronts in some regions
ical data, viewers expect the overall dis- of the color scale while minimizing the 1. Sequential. There is a regular interval
tribution of color they perceive to match presence of fronts elsewhere (Ware, 1988; relationship in sequential data, such as a
the distribution of the underlying data. Mersey, 1990). Figure 1e shows jet’s mis- range of salinity values. Sequential data
However, perception of color is often behavior, where a cone with linear slop- should be represented with a monotoni-
overlooked in oceanography as we con- ing sides viewed from the top appears cally increasing range of lightness values
tinue to rely on colormaps that have com- smoothly varying when plotted with a (Stevens and Marks, 1965; Rheingans,
plex transfer functions between what is simple, unbiased, perceptually uniform, 2000), such as in a grayscale colormap,
visually perceived and the underlying grayscale colormap, yet the same smooth but can also have variations in hue. The

Oceanography | September 2016 9


gray and haline colormaps in Figure  1 halves have mirrored lightness. To allow 1980). Perceptual uniformity is essen-
are sequential, with lightness values that grayscale printing, contours with distinct tial for displaying numerical data with-
increase in lockstep with the under- line styles for each half of the colormap out artificial weighting. Human percep-
lying data. Sequential, perceptually uni- can be overlaid. tion of color value is primarily a function
form colormaps maintain value order of lightness, but is secondarily related
when printed in grayscale, a common 3. Cyclic. In the special circumstance of to hue (Spence et  al., 1999). A percep-
need for papers. periodic data that steps through a cycle, tually uniform colormap can be eas-
such as tidal phase, the colormap should ily generated in the CAM02-UCS color-
2. Diverging. Data can also be plotted have fixed lightness and span several space, where equal changes in Euclidean
relative to a critical value; for example, hues, starting and ending with the same distance correspond to equal perceptual
anomalies or changes over time may be hue. This allows a plot of tidal phase to changes (Li et al., 2012). Such a colormap
presented as deviations about some nom- smoothly transition from 360° to 0° with- can be created using viscm1, in which the
inal value. A diverging colormap should out a jump in the colormap. The phase minimum and maximum lightness values
reflect the relative nature of the data it colormap prints to a single grayscale value, are set, and the points in between can be
represents by combining two sequen- as seen in Figure 1b, so overlaid contours stretched through different hues and sat-
tial colormaps, but with mirrored light- are important when printing to grayscale. uration with linearly increasing lightness
ness values. The balance colormap in values, while always maintaining a uni-
Figure 1 is diverging where positive and Consider Perceptual Uniformity form stepping distance between points
negative data of the same absolute value In a perceptually uniform colormap, (Smith and van der Walt, 2015).
are given equal weight. When printed in any step in the map is perceived by the Perceptual uniformity aligns rate of
grayscale, diverging colormaps maintain viewer to be the same size as any equally change through the colormap with that
monotonic lightness for each half of the sized step elsewhere in the colormap of the data. However, sometimes we may
colormap, but are ambiguous because the (Newhall, 1940; Meyer and Greenberg, want to purposefully emphasize a mean-
ingful critical value in the data. Diverging
colormaps do this with a perceptual jump
at the middle of the colormap around
white. The oxy colormap discussed later
employs both a divergence and a percep-
tual change in hue for emphasis.

Appeal to Intuition and


Be Consistent
Effective data graphics can often be
understood without any verbal expla-
nation. One trick for creating intuitive
figures is to take advantage of cultural
implications we associate with many
oceanographic data types (Robertson,
1990). For example, the terms “warm
color” and “cold color” imply appropri-
ate colors for use in temperature profiles.
Similarly, sea ice concentration might
best be displayed by a colormap that
increases from dark ocean blue to white,
and chlorophyll might best be displayed
in a palette of greens.
Intuition for the meaning of a color-
FIGURE 1. Rows a and b show five example colormaps in color and grayscale, respectively. Row c
map can be developed through expe-
shows the lightness across each colormap. Row d shows the perceptual changes across the color- riencing colors in nature, or through
map (Smith and van der Walt, 2015). Row e shows a plot using each of the colormaps: a plan view repeated exposure to a unique colormap
of a cone with a uniform slope, a tent for balance, and values rotating in a circle for the phase
colormap. The same plots from row e are shown in row f as they look with moderate (50%) deuter-
1
anomaly color deficiency (Smith, 2015). https://github.com/matplotlib/viscm

10 Oceanography | Vol.29, No.3


or any given type of data. For fields with- elicit intuitive understanding of common impression of a series of fronts located
out strong natural color associations oceanographic variables; three divergent near jet’s band of yellow, where the per-
such as salinity or wave height, intu- colormaps; one cyclic colormap; and one ceptually uniform cmocean thermal
ition is developed by consistently asso- hybrid colormap designed for the special colormap shows that in reality, tem-
ciating each variable with its own color- case of displaying oxygen saturation. The perature is smoothly varying and no
map. This principle can hold true within package combines original colormaps strong gradients exist.
a single manuscript or may be devel- developed specifically for this work with Figure 3g–h shows a special case of the
oped over time as a convention, much several preexisting colormaps (Moreland, hybrid oxy colormap developed to repre-
like the Greek letters we tend to associ- 2009; Niccoli, 2012; Brewer, 2013; Samsel sent river plume regions that may include
ate with specific oceanographic variables. et  al., 2015; see Acknowledgments); both low and supersaturated oxygen con-
Just as we do not use σ to represent tem- we have altered these maps for percep- ditions. The oxy colormap is an example
perature, density, and salinity within the tual uniformity using viscm. Single-hue of a specialized colormap designed for a
same manuscript, each variable plotted and multi-hue colormaps are included, very particular application—highlighting
in a manuscript should be represented by and each of the sequential and diverg- both a critical value that defines hypoxic
its own colormap. ing colormaps span a wide range of light- conditions, with associated water-quality
ness to maximize dynamic range in data management implications, as well as
Consider Colorblind Viewers display. The cmocean colormaps have identifying supersaturated oxygen
Rates of colorblindness are low among been given names such as thermal, haline, conditions—while still following the gen-
women, but among men, approximately and ice to help guide users to intuitive eral guidelines for designing good color-
7% of Northern European descendants, colormaps for common oceanographic maps. Although its inflection point is
4% of Asian descendants, and 3% of variables; however, our nomenclature not centered, oxy is a divergent color-
African descendants have some form of is not intended to restrict usage to any map designed to emphasize the critical
red-green colorblindness (Sharpe et  al., particular variable.
1999). For colorblind viewers, reds and Figure 3 compares four oceanographic
greens of similar lightness values can be fields plotted with jet alongside the same
difficult to discern. Figure 1f shows exam- data plotted with cmocean colormaps.
ple colormaps as perceived with a mod- At the top of the figure, sea surface
erate (50%) deuteranomaly, which is the anomalies are represented by the diver-
most common form of color deficiency. gent balance colormap to highlight devi-
The gray, haline, and balance colormaps ations from a zero reference level. In this
maintain distinct colors with moder- context, the balance colormap makes it
ate deuteranomaly so that figures plot- immediately clear to the viewer which
ted with these colormaps will be read- values are above the reference level,
able to color-deficient viewers, though which values are below, and by how much
the balance colormap has changes in red each location deviates from nominal sea
and green values and a shift in the lumi- level. Temperature and salinity profiles
nance and saturation. The phase color- are shown with jet in Figure  3c–f, illus-
map appears duller without green and red trating the brief confusion that can result
hue variation, but the colors in the color- from using the same colormap to rep-
map still vary smoothly. Note that the resent multiple variables within a man-
severity of the colorblindness will change uscript. Temperature and salinity have
how these colormaps appear because the an inverse relationship in these profiles,
changes are nonlinear with severity. and as a result, when the same colormap
is used to represent both fields, the first
cmocean: AN OCEANOGRAPHIC impression may be that the ocean has
COLORMAP PACKAGE inverted itself. Confusion is cleared up
Following the guidelines presented upon inspection of the color bar labels,
above, we have developed a set of per- but comparison to the same data plot-
ceptually uniform colormaps tailored for ted with cmocean colormaps shows arti-
use in oceanography. Figure 2 shows the facts introduced by jet. Namely, while
cmocean collection, which is composed jet captures most of the features present FIGURE 2. Colormaps available in the cmocean
of several sequential colormaps meant to in the underlying data, it also gives the package.

Oceanography | September 2016 11


100% saturation point of oxygen. By lim- CONCLUSIONS the science of visual perception, and
iting the colormap to a simple grayscale We have offered guidelines to consider the benefits of consistent association of
to represent normal oxygen conditions, when selecting or creating colormaps for unique colormaps with unique variables.
red remains available to bring atten- oceanographic data display. Our guide- Although appearance of any colormap will
tion to the low-oxygen finger visible in lines are aimed at increasing the effective- vary by computer monitor or printer, an
Figure  3h while yellow highlights the ness and accuracy of scientific communi- accurate colormap slightly distorted will,
supersaturated Mississippi River plume. cation by considering human intuition, in most cases, outperform an inaccurate

FIGURE 3. Examples of colormap use. The free surface in the northwestern Gulf of Mexico is shown (subplots a and b, where solid line/red are
positive values, dash-dot/blue are negative values, and gray solid lines are bathymetric contours) with a ship track indicated. Data collected
from an undulating towed vehicle along the ship track are shown are shown in the following rows. Depth vs. distance plots along the track are
temperature (c–d), salinity (e–f), and oxygen (g–h). Each property is shown at left in jet and at right in a colormap from cmocean. Data are recent
work of authors DiMarco and Zimmerle for an atlas of oceanographic observations of the mechanisms controlling hypoxia

12 Oceanography | Vol.29, No.3


colormap slightly distorted. Our intent Light, A., and P.J. Bartlein. 2004. The end of the Tufte, E.R. 1983. The Visual Display of Quantitative
rainbow? Color schemes for improved data graph- Information. Graphics Press.
is to maximize the overall accuracy of ics. Eos, Transactions American Geophysical Ware, C. 1988. Color sequences for univariate
communication in oceanography by pro- Union 85(40):385–391, http://dx.doi.org/​ maps: Theory, experiments and principles. IEEE
10.1029/2004EO400002. Computer Graphics and Applications 8(5):41–49,
viding evidence-based guidelines along Mersey, J.E. 1990. Colour and Thematic Map Design: http://dx.doi.org/10.1109/38.7760.
with a collection of colormaps that have The Role of Colour Scheme and Map Complexity
in Choropleth Map Communication. University of
been developed with these guidelines in Toronto Press, 157 pp.
ACKNOWLEDGMENTS
This work has been under development for several
mind. The cmocean colormaps are freely Meyer, G.W., and D.P. Greenberg. 1980. Perceptual
years and was improved through conversations with
color spaces for computer graphics. ACM
available online for Python2, MATLAB3, SIGGRAPH Computer Graphics 14(3):254–261,
fellow oceanographers and scientists. The scientific
Python community has been particularly insightful on
R4, Ocean Data Viewer5, and Generic http://dx.doi.org/10.1145/800250.807502.
colormap questions and answers, especially Damon
Moreland, K. 2009. Diverging color maps for scien-
Mapping Tools6, and the ice color- tific visualization. Pp. 92–103 in Advances in Visual
McDougall, Nathaniel Smith, and Stéfan van der Walt.
Special thanks to fellow colormap enthusiast Matteo
map has been absorbed into Antarctic Computing. Springer.
Niccoli for helpful edits and conversation. Thanks
Newhall, S.M. 1940. Preliminary report of the
Mapping Tools for MATLAB (Greene OSA subcommittee on the spacing of the
also to four Oceanography reviewers whose input
significantly improved the manuscript.
et al., in press). The cmocean colormaps Munsell colors. Journal of the Optical Society of
Figures 1 and 3 were created using Python’s
America 30(12):617–645, http://dx.doi.org/10.1364/
are provided to add to the pool of options JOSA.30.000617.
matplotlib plotting package (Hunter, 2007); scripts
are available online at https://github.com/kthyng/
available to oceanographers. Our intent is Niccoli, M. 2012. “The rainbow is dead…long live the
colormap_paper. Oceanographic data presented
rainbow! Series Outline,” https://mycarta.wordpress.
not to make these the standard colormaps com/2012/05/29/the-rainbow-is-dead-long-live-the-
here, collected under NOAA-CSCOR contract
NA09NOS4780208 (DiMarco), can be obtained from
of oceanography; rather, our intent is to rainbow-series-outline.
NOAA National Centers for Environmental Information
Rappaport, C. 2002. A color map for effective black-
help oceanographers make deliberate and and-white rendering of color-scale images. IEEE
(Accession number 0088164).
Many of the cmocean colormaps are based on
informed choices when choosing a color- Antennas and Propagation Magazine 44(3):94–96,
other colormaps or were inspired by other research-
http://dx.doi.org/10.1109/MAP.2002.1028735.
map to communicate their data. Rheingans, P.L. 2000. Task-based color scale design.
ers. Colormaps haline, dense, algae, matter, and
balance were based on similar Color Brewer color-
Pp. 35–43 in 28th AIPR Workshop: 3D Visualization
maps (Brewer, 2013). Colormap thermal is similar to
REFERENCES for Data Exploration and Decision Making.
matplotlib colormaps inferno and plasma. Colormap
Borkin, M., K. Gajos, A. Peters, D. Mitsouras, International Society for Optics and Photonics.
delta was based on work by Samsel et al. (2015).
S. Melchionna, F. Rybicki, C. Feldman, and Robertson, P.K. 1990. A methodology for scien-
This study was funded jointly by a grant from
H. Pfister. 2011. Evaluation of artery visual- tific data visualisation: Choosing representations
the BP Gulf of Mexico Research Initiative (SA12-09/
izations for heart disease diagnosis. IEEE based on a natural scene paradigm. Pp. 114–123
GoMRI-006) and the Texas General Land Office
Transactions on Visualization and Computer in Visualization’90, Proceedings of the First IEEE
through TGLO Improving Hydrodynamic Predictions
Graphics 17(12):2,479–2,488, http://dx.doi.org/​ Conference on Visualization, San Francisco, CA,
(Award No. 10-096-000-3927) and Design of a
10.1109/TVCG.2011.192. October 23–26, 1990, http://dx.doi.org/10.1109/
Modern Web Interface to TGLO TABS Model and Data
Borland, D., and R.M. Taylor II. 2007. Rainbow VISUAL.1990.146372.
Products – Phase 2 (Award No. 16-092-000-9284).
color map (still) considered harmful. IEEE Samsel, F., M. Petersen, T. Geld, G. Abram,
Computer Graphics and Applications (2):14–17, J. Wendelberger, and J. Ahrens. 2015. Colormaps
http://dx.doi.org/10.1109/MCG.2007.323435. that improve perception of high-resolution AUTHORS
Brewer, C. 2013. “Colorbrewer 2.0: Color advice for ocean data. Pp. 703–710 in Proceedings of Kristen M. Thyng (kthyng@tamu.edu) is Assistant
cartography,” http://colorbrewer2.org. the 33rd Annual ACM Conference Extended Research Professor, Department of Oceanography,
Bryant, B., M. Holiner, R. Kroot, K. Sherman- Abstracts on Human Factors in Computing Texas A&M University, College Station, TX, USA.
Morris, W.B. Smylie, L. Stryjewski, M. Thomas, Systems. Association for Computing Machinery, Chad A. Greene is Research Science Associate, The
and C.I. Williams. 2014. Usage of color scales http://dx.doi.org/10.1145/2702613.2702975. University of Texas at Austin Institute for Geophysics,
on radar maps. Journal of Operational Sharpe, L.T., A. Stockman, H. Jägle, and J. Nathans. Austin, TX, USA. Robert D. Hetland is Professor,
Meteorology 2:169–179, http://dx.doi.org/10.15191/ 1999. Opsin genes, cone photopigments, color Department of Oceanography, Texas A&M University,
nwajom.2014.0214. vision, and color blindness. Pp. 3–51 in Color vision: College Station, TX, USA. Heather M. Zimmerle is
Eddins, S. 2014. “A new colormap for MATLAB: From Genes to Perception. K.R. Gegenfurtner, and Research Assistant, Department of Oceanography,
Part 1. Introduction.” http://blogs.mathworks.com/ L.T. Sharpe, eds, Cambridge University Press. Texas A&M University, College Station, TX, USA.
steve/2014/10/13/a-new-colormap-for-matlab-​ Smith, N.J. 2015. “Colorspacious’s documentation.” Steven F. DiMarco is Professor, Department of
part-1-introduction. https://colorspacious.readthedocs.org/en/latest. Oceanography, and Geochemical and Environmental
Greene, C.A., D.E. Gwyther, and D.D. Blankenship. Smith, N.J., and S. van der Walt. 2015. “mpl Research Group, Texas A&M University, College
In press. Antarctic mapping tools for MATLAB. colormaps.” http://bids.github.io/colormap. Station, TX, USA.
Computers and Geosciences, http://dx.doi.org/​ Spence, I., N. Kutlesa, and D.L. Rose. 1999. Using
10.1016/j.cageo.2016.08.003. color to code quantity in spatial displays. Journal of
ARTICLE CITATION
Hunter, J.D. 2007. Matplotlib: A 2D graph- Experimental Psychology: Applied 5(4):393–412.
Thyng, K.M., C.A. Greene, R.D. Hetland,
ics environment. Computing In Science & Stauffer, R., G.J. Mayr, M. Dabernig, and A. Zeileis.
H.M. Zimmerle, and S.F. DiMarco. 2016. True colors
Engineering 9(3):90–95, http://dx.doi.org/10.1109/ 2015. Somewhere over the rainbow: How to make
of oceanography: Guidelines for effective and accu-
MCSE.2007.55. effective use of colors in meteorological visual-
rate colormap selection. Oceanography 29(3):9–13,
Li, C., M. Ronnier Luo, C. Li, and G. Cui. 2012. izations. Bulletin of the American Meteorological
http://dx.doi.org/10.5670/oceanog.2016.66.
The CRI-CAM02UCS colour rendering index. Society 96(2):203–216, http://dx.doi.org/10.1175/
Color Research & Application 37(3):160–167, BAMS-D-13-00155.1.
http://dx.doi.org/10.1002/col.20682. Stevens, J.C., and L.E. Marks. 1965. Cross-modality
matching of brightness and loudness. Proceedings
of the National Academy of Sciences of the United
States of America 54(2):407–411.

2
http://matplotlib.org/cmocean
3
http://www.mathworks.com/matlabcentral/fileexchange/57773
4
http://dankelley.github.io/oce
5
https://github.com/kthyng/cmocean-odv
6
http://soliton.vm.bytemark.co.uk/pub/cpt-city/cmocean/index.html

Oceanography | September 2016 13

You might also like