Data visualization turns numbers into visual patterns that people can compare quickly. The choice of encoding, such as position, length, area, shape, or color, strongly affects what viewers notice and how accurately they read values. Good encodings reduce mental effort and help the main statistical message stand out.
Poor encodings can hide trends, exaggerate differences, or make a chart inaccessible.
Key Facts
- Position on a common scale is usually the most accurate visual encoding for comparing numerical values.
- Length is usually easier to compare than area, and area is usually easier to compare than volume.
- Use sequential color scales for ordered values from low to high, such as temperature or income.
- Use diverging color scales when values move away from a meaningful center, such as difference from average or zero.
- Use categorical color palettes for groups with no natural order, and limit them to about 6 to 8 clearly distinct colors.
- A common normalization formula for color mapping is scaled value = (x - min) / (max - min).
Vocabulary
- Visual encoding
- A visual encoding is the way data values are represented using visual features such as position, length, color, size, or shape.
- Sequential color scale
- A sequential color scale uses a smooth progression of color or lightness to show ordered values from low to high.
- Diverging color scale
- A diverging color scale uses two color directions from a central reference value to show positive and negative or above and below differences.
- Categorical palette
- A categorical palette is a set of distinct colors used to label separate groups that do not have a numerical order.
- Perceptual ranking
- Perceptual ranking is the ordering of visual encodings by how accurately and quickly people can interpret them.
Common Mistakes to Avoid
- Using rainbow colors for ordered data is wrong because changes in hue do not increase evenly, so equal numerical steps can look unequal.
- Encoding exact quantities with bubble area is wrong when precise comparison matters because people often compare diameters instead of areas.
- Using red and green as the only group colors is wrong because many viewers with color vision deficiency may not be able to distinguish them.
- Changing both color and size without a clear legend is wrong because viewers may not know which visual feature represents which variable.
Practice Questions
- 1 A dataset has values 10, 20, 30, 40, and 50. Using scaled value = (x - min) / (max - min), what scaled color value should be assigned to x = 30?
- 2 A bar chart and a bubble chart both show sales of 25, 50, and 100 units. What are the ratios 50/25 and 100/50, and which chart type makes those ratios easier to compare accurately?
- 3 You need to map temperature change from -6 degrees Celsius to +6 degrees Celsius relative to zero. Should you use a sequential, diverging, or categorical color scale, and why?
- 4 A dashboard shows 12 product categories using 12 similar colors. Explain why this design may be hard to read and name one better encoding choice.