SEG‑D Monitor Download

Lessons › Lesson 4

Seeing the data: colour, order and the eye

A shot is thousands of numbers, a line millions. Nobody reads them one by one: we look at pictures of them. A good picture lets the eye find what matters at a glance. A poor one hides it - or shows something that is not there at all. This lesson is about making the picture honest and easy to read: how the eye works, which colours to use, and in what order to put things.

  • about 30 minutes
  • four live demos
  • a 10-question quiz at the end

1Why draw the data at all

In 1973 the statistician Francis Anscombe published four small sets of numbers - eleven points each - to answer a view he found common among statisticians: that "numerical calculations are exact, but graphs are rough". The four sets have the same summary, to two or three decimals:

In all four setsMean of xVariance of xMean of yVariance of yCorrelationBest-fit line
Value9117.504.1250.816y = 3.00 + 0.500 x

Anyone who read only those figures would say the four sets are the same. Drawn, they are four different things:

Anscombe's quartet: four sets of eleven points with the same means, variances, correlation and best-fit line, drawn side by side - a cloud about a line, a curve, a line with one outlier, and one far point that makes the line. I a cloud about a line II a smooth curve III a line and one outlier IV one far point makes the line y = 3.00 + 0.500 x in every panel (the thin line)
Anscombe's quartet. Same means, same variances, same correlation, same line - and four different stories. Only the picture tells them apart.

The same on a vessel

Here are the timing errors of eight guns over twelve shots - each gun's fire time minus its aim point, in milliseconds, with a limit of ±1.0 ms. Look at the numbers first: is any gun drifting, and is any reading outside the limit? Then switch to the picture.

Timing error, ms (fire time minus aim point), limit ±1.0 ms
Gun123456789101112
1−0.2−0.2−0.1−0.2−0.3−0.1+0.3+0.2+0.2−0.20.0−0.1
2−0.2−0.2−0.2+0.3+0.2+0.2+0.2−0.2−0.1+0.1+0.1+0.2
3+0.2−0.2+0.1+0.10.0−0.20.0−0.2+0.3+0.20.0−0.1
4+0.20.0+0.2+0.20.0−0.1+0.10.0−0.2−0.1+0.2−0.3
5−0.3+0.1−0.10.00.0−0.1+0.3−0.2−0.1−0.2+0.1−0.1
6−0.1+0.1−0.10.0+0.3+0.4+0.6+0.6+0.7+0.9+1.0+1.2
7−0.3−0.1+0.3+0.2−0.1+0.3+0.1+0.2−0.1−0.20.0−0.2
8−0.1+0.3−0.1−0.3−0.3−0.2+0.2−0.1−0.1−0.2+0.30.0

Ninety-six numbers. The answer is in them - but the eye has to read every one, compare it with the others and remember. Try to find it before you switch.

Gun 6 turns amber from about shot 5 and deepens shot by shot: it is drifting late. Its last reading, +1.2 ms, is past the limit, and it is the only red cell. The same numbers, found in a second.

The idea to keepNumbers are for looking things up; pictures are for seeing. Summaries can agree while the data does not - draw it before you trust it.

2What the eye sees first

Some differences are seen before you look for them. A mark of another colour in a field of grey, a square among circles, a line at another angle: they pop out. Psychologists who study visual search find that for a target that differs in one feature, how long it takes to find it hardly depends on how many other marks there are.

A target that differs only in a combination of features - a blue square among blue circles and grey squares - does not pop out. The eye has to check the marks one by one, and the more marks, the longer it takes. Treisman and Gelade described this in 1980, in their feature integration theory.

The search demo needs JavaScript; the two paragraphs above say what it shows.

Which pictures are read most accurately

Seeing that something is different is one task; reading how much is another. In 1984 William Cleveland and Robert McGill, at Bell Labs, ranked the ways a chart can encode a number by how accurately people read them back - from most to least accurate:

  1. Position along a common scale - dots or bar ends against one axis
  2. Position along scales that are not aligned - the same, in separate panels
  3. Length, direction, angle
  4. Area
  5. Volume, curvature
  6. Shading and colour saturation

Colour comes last for reading a value. It is still the best way to show a pattern over thousands of cells - a heat map of guns against shot points - because there is no room there for a chart per gun. So a heat map needs a way back to the number: a value under the pointer, a table, a chart of the one gun that looks wrong.

The idea to keepMake what matters differ in one feature, so it pops out. Let position carry the numbers, and colour carry the pattern.

3Three jobs for colour

Before choosing colours, ask what the colour has to say. There are three main answers, and each has its own kind of colour map - the same three that ColorBrewer, a tool made for maps, offers:

Three kinds of colour map: sequential, light to dark for how much; diverging, two hues meeting at a pale middle for which side of zero; qualitative, separate hues for which one. Sequential how much: low to high noise level of a channel energy of a shot Diverging which side of a middle that means “nothing” amplitude ± depth minus target fire time minus aim 0 Source 1 Source 2 Source 3 Qualitative which one: no order at all sources · sub-arrays lines · gun types
Sequential, diverging and qualitative - and what each is for in source QC.
  • Sequential: how much. In the words of matplotlib's guide, sequential maps "change in lightness and often saturation of color incrementally, often using a single hue; should be used for representing information that has ordering." A channel's noise level, a shot's energy, a count.
  • Diverging: which side, and how far. Two hues "that meet in the middle at an unsaturated color; should be used when the information being plotted has a critical middle value, such as topography or when the data deviates around zero." Seismic amplitude, a gun's depth minus its target, fire time minus aim point. The middle must be the value that means "nothing" - zero, the target, the median.
  • Qualitative: which one. Separate hues with no order: they "should be used to represent information which does not have ordering or relationships." Sources, sub-arrays, lines. Keep them few: the more hues, the closer the neighbours, and the harder to tell apart.

There is a fourth, rarer kind: cyclic maps, which end where they begin - "for values that wrap around at the endpoints, such as phase angle, wind direction, or time of day".

The idea to keepFirst ask what the colour must say - how much, which side, or which one - and the kind of map follows.

4The rainbow trap

For years the most familiar colour map in science was the rainbow: dark blue, blue, cyan, green, yellow, red, dark red. Many common programs once used it as their default, which is one reason it is still everywhere. It looks rich. It also misleads, and the reason is lightness.

The eye reads changes in lightness as changes in the data far better than changes in hue. matplotlib's guide puts it plainly: "colormaps which have monotonically increasing lightness through the colormap will be better interpreted by the viewer." The rainbow's lightness does not rise - it climbs from dark blue to bright cyan and yellow, then falls again to dark red:

The rainbow map jet and the map viridis, each in colour, printed in grey, and with its lightness drawn as a line: the rainbow's lightness rises and falls, with its lightest colours in the middle; viridis rises from end to end. Rainbow (jet) printed in grey Viridis printed in grey its lightness, low to high value → low value high value
Each map in colour, printed in grey, and with its lightness (OKLab L) drawn as a line. The rainbow is lightest near the middle of its range; viridis grows lighter all the way.
  • It draws edges that are not there. Where the lightness turns, smooth data looks banded. Crameri, Shephard and Heron wrote in 2020 that a rainbow map "adds artificial boundaries to some parts of the data range, hiding small-scale variations elsewhere".
  • It points the eye at the middle. "In rainbow colour maps, the yellow is the brightest colour and attracts the eye the most" - so the most noticed values are not the largest ones.
  • It loses its order in print. In grey, the low and the high ends both come out dark. matplotlib's guide says that maps "such as Accent, hsv, jet and turbo, change from darker to lighter and back to darker grey throughout the colormap. This would make it impossible for a viewer to interpret the information in a plot once it is printed in grayscale."

The remedy is a perceptually uniform map: one "in which equal steps in data are perceived as equal steps in the color space". The best known is viridis, designed by Stéfan van der Walt and Nathaniel Smith to be "perfectly perceptually-uniform, both in regular form and also when converted to black-and-white", and chosen as matplotlib's default colour map from version 2.0.

The colour map demo needs JavaScript; the drawing above shows the two maps it compares.

The idea to keepChoose a map whose lightness follows the data: rising for how much, lightest (or darkest) at the middle for which side. If it does not survive grey print, it does not show the order.

5Not everyone sees the same colours

Red-green colour blindness affects up to 1 in 12 men (8 %) and 1 in 200 women (0.5 %). If 8 % of men have it, the chance that at least one of a crew of 25 men does is 1 − 0.9225, about 88 % - so somebody reading your plot probably does.

For them, a red and a green of similar lightness look alike. Here is a pair of status lights as three people see them - the colours below are computed with the simulation of Machado, Oliveira and Fernandes (2009), the same one the demo above uses:

A green and a red light as seen with normal colour vision, and as simulated for deuteranopia and protanopia: without colour difference they look alike, olive and brown. Below, the same lights with a tick and a cross, readable for everyone. Normal colour vision OK? FAULT? ✓ ✕ Deuteranopia (no green cones) OK? FAULT? ✓ ✕ Protanopia (no red cones) OK? FAULT? ✓ ✕ top: colour alone · bottom: the same colours with a mark that needs no colour
Top row: an "OK" green and a "FAULT" red, told apart by colour alone - for two of the three readers, they are nearly the same olive. Bottom row: the same colours with a tick and a cross. Everybody reads those.
  • Never let red against green carry a meaning alone. matplotlib's guide: "The most common form of color vision deficiency involves differentiating between red and green. Thus, avoiding colormaps with both red and green will avoid many problems in general."
  • Add a second channel - a word, a symbol, a position, a pattern, or a clear difference in lightness.
  • Check it. Look at your picture through a colour-blindness simulator, and print it in grey once.

The idea to keepColour is a help, never the only way. If the meaning is lost in grey or to a colour-blind eye, it needs a second channel.

6One colour, one meaning

Once a colour means something, it has to mean it everywhere - on every chart of the screen and on every page of the report. A reader learns a colour once and then trusts it.

  • Give red one job. Red reads as a warning. SEG‑D Monitor's End of Line report keeps red for a reading outside its limits and nothing else; a difference from a line's median - interesting, not wrong - is drawn blue and amber. The timing table in part 1 does the same: one red cell, the one reading past the limit.
  • The same thing, the same colour. If source 1 is blue on one chart, it is blue on all of them. When one source is hidden, the others keep their colours - a colour that moves with a filter teaches the reader something false.
  • Put the middle where it means "nothing". A diverging map is centred on zero, the target or the median - with the same reach on both sides. If the scale is set by the data alone, the white middle drifts off zero, and "on target" no longer looks like it.
  • Say what the colours mean. A colour bar with units, a legend, labels on the lines - so no one has to guess.

The idea to keepDecide what each colour means, write it on the chart, and never let it mean anything else.

7Order shows the pattern

The order of the rows and columns is as much a choice as the colours - and it decides what can be seen. A few rules:

  • Sort by the value you want compared. A bar chart of guns sorted by their error shows the worst at once; sorted by name, it shows the alphabet.
  • Bring together what belongs together. Guns of one sub-array, channels of one streamer, side by side. In 1967 the French cartographer Jacques Bertin, in Sémiologie graphique, gave a way to reorder - seriate - a table's rows and columns until its pattern appears: the Bertin matrix.
  • Keep the natural order where the order means something. Time, shot point, position along the string. Never sort the shots of a line by value: the line's story is in their order - when a gun began to drift, where the swell came in.
  • Beware sorting numbers as text. A computer comparing names character by character puts "10" before "2", because "1" comes before "2": G1, G10, G11 … G2. Natural sort order treats a number inside a name as a number.

The sorting demo needs JavaScript; the rules above are what it shows.

The idea to keepSort the rows to bring alike together. Never sort time.

8Sorting seismic traces: gathers

In seismic, "sorting" has a second meaning. Every trace belongs to one shot and one receiver, and traces can be grouped by anything they share. Each group is a gather, and each gather shows some things better than others:

GatherThe traces that shareGood for
Common shotone shot, many receivers"very easy to inspect traces in these displays for bad receivers or bad shots"
Common receiverone receiver, many shotsa basic check of the acquisition, like the shot gather
Common midpoint (CMP)one midpoint between source and receivervelocity analysis and moveout correction, then stacking: the traces are sorted by offset
Common offsetone source-receiver distance"basic quality control, because it approximates a structural section"

The midpoint of a trace is half way between its source and its receiver, (xs + xg) ÷ 2. On a towed streamer that is straight behind the vessel, each channel stays at about the same distance from the source, so one channel's traces from every shot make a common-offset section.

The gather demo needs JavaScript; the table above says what each sort is for.

The idea to keepSort the traces so that the fault you are looking for becomes one line: a weak shot is one faint column in a common-offset section, a bad channel is one noisy trace in every shot gather.

9Interesting facts

Exact numbers, rough graphs?

Anscombe built his quartet in 1973 against the view that "numerical calculations are exact, but graphs are rough".

Wikipedia: Anscombe's quartet

A chemist's own eyes

The first account of colour blindness was given by the English chemist John Dalton, in 1794.

Wikipedia: Color blindness

Circles of dots

The best-known test for red-green deficiency is named after Shinobu Ishihara, who first published it in 1917: each plate is a circle of coloured dots.

Wikipedia: Ishihara test

The loudest colour

In a rainbow map, yellow is the brightest colour and draws the eye the most - wherever the data puts it.

Crameri, Shephard & Heron (2020)

10 before 2

Sorted as text, "10.jpg" comes before "2.jpg". Natural sort order reads the number as a number.

Wikipedia: Natural sort order

Lightness has an order

Bertin counted size, value (lightness) and grain as ordered visual variables. Shape is not ordered; hue runs round in a circle.

Wikipedia: Visual variable

10Quiz: what stayed?

Ten questions. Pick an answer and it is marked at once, with a line on why. Nothing you answer leaves this page.

  1. 1. Anscombe's four data sets have the same means, variances, correlation and best-fit line. What do they show?
    Answer

    The summary can agree while the data does not. Drawn, the sets are a cloud, a curve, a line with an outlier and one far point. Anscombe built them against the view that graphs are rough and numbers exact.

  2. 2. Cleveland and McGill ranked the ways a chart shows a number. Which is read most accurately?
    Answer

    Position along a common scale - dots or bar ends against one axis. Shading and colour saturation come last: colour is for patterns, not for reading values.

  3. 3. Which target is found about as fast among 70 marks as among 10?
    Answer

    A blue mark among grey ones. A target that differs in one feature pops out. A combination of two features must be searched for mark by mark, and more marks take longer.

  4. 4. You colour each gun's depth minus its target, from −1 m to +1 m. Which kind of colour map?
    Answer

    Diverging, centred on 0 m. The data has a middle that means "on target" and two directions - shallower and deeper. That is the job of two hues meeting at an unsaturated middle.

  5. 5. A chart shows which of three sources fired each shot. Which kind of colour map?
    Answer

    Qualitative. Source 1, 2 and 3 have no order and no middle: the colour says "which one", so separate hues with no order between them.

  6. 6. Why does a rainbow colour map mislead?
    Answer

    Its lightness rises and falls. The eye reads lightness as the data, so the rainbow adds boundaries that are not there, makes the middle look the most important, and prints dark at both ends.

  7. 7. About how many men have red-green colour blindness?
    Answer

    Up to 1 in 12. For women it is about 1 in 200. On a crew of 25 men, at least one of them very probably has it - so never let red against green carry a meaning alone.

  8. 8. In SEG‑D Monitor's End of Line report, what does red mean?
    Answer

    Outside its limits, and nothing else. A difference from the median is drawn blue and amber. A reader who learns that red means wrong can then trust every red cell.

  9. 9. Gun names G1 to G12 are sorted as text. What comes right after G1?
    Answer

    G10. Text is compared character by character, and "G1" is the start of "G10". The order runs G1, G10, G11, G12, G2 … - natural sort order puts G2 second.

  10. 10. One shot fired weak. In which display does it show at a glance, as one faint column?
    Answer

    A common-offset section. There every shot gives one trace side by side, so the weak one stands out against its neighbours. Its own shot gather is fainter all over, with nothing beside it to compare.

11Sources and further reading

Every fact in this lesson comes from one of these. The drawings and the demos' data are the site's own, made up for this page; the colour maps are matplotlib's, and the colour-blind colours are computed with the simulation listed below.

  1. Anscombe, F. J. (1973). Graphs in statistical analysis. The American Statistician 27(1), 17-21 - the data and its summary, as given in Wikipedia: Anscombe's quartet.
  2. Wikipedia: Visual search - pop-out, feature and conjunction search, and Treisman and Gelade's feature integration theory (1980).
  3. Cleveland, W. S. and McGill, R. (1984). Graphical perception: theory, experimentation, and application to the development of graphical methods. Journal of the American Statistical Association 79(387), 531-554 - the ranking, as set out in Cornell University's INFO 3312: Graphical perception.
  4. matplotlib: Choosing colormaps in Matplotlib - the classes of colour map, lightness, jet in grey, colour vision deficiency.
  5. ColorBrewer: Learn more: sequential, diverging and qualitative schemes.
  6. Crameri, F., Shephard, G. E. and Heron, P. J. (2020). The misuse of colour in science communication. Nature Communications 11, 5444.
  7. van der Walt, S. and Smith, N.: A better default colormap for Matplotlib - how viridis was designed.
  8. Wikipedia: Color blindness - how many people, and John Dalton.
  9. Wikipedia: Ishihara test.
  10. Machado, G. M., Oliveira, M. M. and Fernandes, L. A. F. (2009). A physiologically-based model for simulation of color vision deficiency. IEEE Transactions on Visualization and Computer Graphics 15(6), 1291-1298.
  11. Wikipedia: Jacques Bertin and Visual variable - Sémiologie graphique (1967), the Bertin matrix, ordered variables.
  12. Wikipedia: Natural sort order.
  13. Bianco, E. (2011). G is for Gather. Agile Scientific - the four gathers and what each is good for.
  14. Stanford Exploration Project: Common-midpoint stacking - the midpoint, and sorting traces into common-midpoint gathers.