1. Home
  2. Explore
  3. Computer Science
  4. Effective Data Visualization

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Effective Data Visualization

Effective Data Visualization

What Data Visualization Does

Data visualization is any visual representation that turns data into a form people can inspect. Charts, graphs, and maps are familiar examples, but tables also count as visualizations.

Visualization supports several stages of research:

  • Exploration: revealing patterns, unusual observations, and possible problems in data.

  • Analysis planning: helping determine which statistical methods or questions may be appropriate.

  • Communication: making findings understandable to an audience.

A visualization is therefore more than a way to display results. It can help researchers understand their data and communicate an argument about what the data means.

Why visualizing data matters

Summary statistics can conceal important differences between datasets. A classic example, Anscombe’s quartet, consists of four sets of paired xxx and yyy values with the same means for xxx and yyy, as well as the same correlation between the variables. Despite having matching summary statistics, the four datasets have very different shapes when plotted.

  • One dataset has points distributed around a roughly linear relationship.

  • Another has a clearly curved relationship, making a straight-line model misleading.

  • A third has points closely following a line except for an outlier, which may deserve investigation.

  • A fourth has most of its xxx values concentrated at one position, suggesting a possible data-collection or equipment problem if a wider spread was expected.

The example demonstrates that numerical summaries cannot replace inspection of the data. Plotting values makes patterns immediately visible that are difficult to detect by reading a table of numbers.


Visual Attributes and Perception

Charts are built from visual attributes that the brain can detect rapidly. These are often called pre-attentive attributes because they can “pop out” before a viewer deliberately studies the figure.

Important attributes include:

  • Spatial position: where a mark appears along an axis.

  • Length and orientation: how long a mark is and the direction it faces.

  • Size and width: how large a mark or shape appears.

  • Color: including differences in hue, brightness, and saturation.

  • Shape: distinctions among symbols or marks.

These attributes are most effective when used selectively. A chart that combines many colors, shapes, sizes, and other visual differences at once can become difficult to interpret. Instead, a designer can use a small number of attributes to direct attention to a meaningful pattern—for example, using position to show values and a distinct color to emphasize one category.

How well people perceive different encodings

Visual encodings vary in how accurately people can compare values.

For comparing numerical magnitude, viewers are generally strongest at judging:

  1. Position along a common scale.

  2. Length from a shared baseline.

  3. Area, which can communicate broad patterns but is less precise.

  4. Color brightness or saturation, which can show differences but is weaker for fine quantitative comparisons.

For distinguishing categories, spatial grouping or region can be effective. Color hue can also separate categories, while shape is often less effective, especially when many categories must be distinguished.

These tendencies help explain why familiar chart types are useful: many of them rely on position and length, which people interpret comparatively well.


Choosing a Chart to Match the Data and Question

A chart should be selected according to the type of data and the comparison the audience needs to make. The following are useful starting points, not inflexible rules.

Bar charts: categories and values

A bar chart is a strong starting point when comparing a numerical value across categories, such as average temperature at several locations. Bars use length from a shared baseline, so viewers can compare values relatively precisely.

  • Bar charts generally need to start at zero. Because viewers compare bar lengths and their ratios, truncating the axis can exaggerate differences.

  • Categories may be presented in a meaningful order or sorted by value, depending on the message.

Line charts: time and values

A line chart is a natural starting point when showing numerical values across dates or times. Connecting observations with a line implies that time passes between the measured points, and that the line is a reasonable representation of what happens between them.

  • A line chart can focus on a narrower range of values when that makes relevant differences easier to see.

  • Multiple lines can show how categories change over time.

  • Unlike bars, a line chart does not necessarily need a vertical axis starting at zero, though the scale must still represent the data honestly.

Scatter plots: relationships between numerical variables

A scatter plot is useful for examining the relationship between two numerical variables, particularly when assessing possible correlation. The spread of points helps viewers judge whether the variables move together and how closely the observations cluster around a possible trend.

Chart choice depends on the intended comparison

No chart type is best for every purpose. The same data can support several legitimate visualizations, each making different patterns easier or harder to see. A visualization should therefore be designed around the question: Which comparison matters most to the audience?


A Worked Example: Comparing Categories and Properties

Consider a dataset with five vegetables and several properties, such as how often people describe each vegetable as green, yellow, cheap, tasty, or gross. Different displays of the same data make different comparisons prominent.

Tables

A table is useful for precise values and lookup. It is compact, and readers can locate a specific value or distinguish small numerical differences.

However, tables are weak at revealing broad patterns across many values. A large set of numbers can be hard to scan, even when every value is available.

Heat maps

A heat map replaces numerical values with a ramp of color brightness or intensity.

  • It is compact and visually striking.

  • Blocks of light or dark can make broad patterns noticeable.

  • Fine differences in color are difficult to judge quantitatively.

  • Nearby colors can affect how a viewer perceives a color, making comparisons less reliable.

Heat maps are therefore often useful for spotting general patterns, but less suitable when precise comparison of similar values is the main goal.

Area-encoded squares

Values can also be represented by the area of squares. This may make overall patterns visible, especially if a consistent color scheme groups related values. For example, viewers may notice a gradual increase or decrease across a category.

Area is less effective than position or length for precise comparisons. The chart can also bias attention: when items share a color or another visual property, viewers tend to group them together and may focus on the resulting columns or clusters.

Pie charts

Pie charts can work when there are only a few slices and the values represent parts of a whole.

  • They become difficult to read when there are many slices.

  • Viewers are most able to compare slices that begin at the same reference point, such as the top of the circle.

  • Slices with similar sizes are hard to distinguish.

  • A pie chart is appropriate only when the part-to-whole interpretation is valid.

If totals differ across categories, the pies may also differ in overall area. That can make total size part of the visual message, intentionally or otherwise.

Stacked bar charts

A stacked bar chart is useful when the total for each category matters. The full bar provides a common baseline for comparing totals, and the segment at the baseline can also be compared across categories.

Segments farther from the baseline are harder to compare because they do not share a common starting point. For example, comparing two similarly sized segments in the middle or at the top of different bars may be difficult.

Faceted or small-multiple bar charts

A faceted bar chart, also called a small-multiples chart, gives each category its own separate bar chart while retaining a common numerical scale. This can make within-category comparisons clearer and allow fine distinctions between values to be seen.

This arrangement may also make some across-category comparisons less immediate, so it is most useful when the patterns within each category are especially important.

Grouped bars

A grouped bar chart places bars for several properties beside each other within each category.

  • It is often easy to compare values within one category.

  • It can be harder to follow one property across many categories, because the viewer must mentally filter the same color or position repeatedly.

  • Many adjacent colors can create a distracting visual effect.

Grouped bars are thus useful for some comparisons, but may not be the clearest choice when the main task is to compare one property across categories.

Dot plots

A dot plot places a mark along a shared numerical scale for each value. Because viewers compare position on a common scale, dot plots can reveal fine distinctions more clearly than area-based displays.

  • Dot plots work especially well when only a few categories are being compared.

  • Too many categories or colors can make the display cluttered.

  • Connecting dots with lines may help viewers see patterns, but it can imply a meaningful relationship between categories.

Connecting categorical values with lines

Lines naturally suggest continuity or an intervening sequence. They are appropriate for ordered data such as time, where something exists between observations. They can be misleading for unrelated categories, such as different vegetables, because viewers may infer a continuous trend that has no meaningful interpretation.

Showing distributions

Sometimes the important message is not the value of each category but the distribution of values.

  • Plotting individual observations can show spread and clustering.

  • A dot-style distribution display can make it easy to see, for example, that one property has a much tighter range than another.

  • When there are many observations, a box-and-whisker plot can summarize the distribution instead of displaying every individual value.

The central design decision is to identify the comparison that matters and select the representation that makes that comparison easiest to perceive.


Three Core Principles for Effective Figures

1. Keep the design simple

Unnecessary visual effects can distort data or make a figure harder to interpret.

Avoid 3D charts. A three-dimensional pie chart can make a front slice appear larger because of the visible depth of the slab. The visual effect changes how the proportions look, even though the values have not changed. Three-dimensional bar charts can similarly obscure comparisons and make precise lookup difficult.

Prefer simple two-dimensional displays unless the third dimension represents meaningful data and can be interpreted clearly.

Simplicity also applies to legends. A legend requires viewers to look back and forth between the key and the chart. They must remember which color represents which category while making comparisons. When feasible, directly label lines, slices, or other marks so that the category can be identified where it appears. Direct labels reduce cognitive effort, although legends remain useful when direct labeling would overcrowd the figure.

2. Use color purposefully

Color should not be added merely because the software supplies several colors by default. If bars are already separated and labeled, different colors may add no useful information.

Instead, reserve strong color for emphasis:

  • Keep background or less important values in a light, neutral color, often light gray.

  • Use a darker or more saturated color for the value or group that supports the central comparison.

  • Retain enough context for viewers to understand the emphasized value.

This approach directs attention without changing the underlying data. Selective emphasis helps an audience notice the intended pattern while leaving it free to judge whether the evidence supports the argument.

3. Give every figure a purpose

A figure should do more than display all available data. It should tell a story or support an argument that contributes to a larger explanation.

For example, a line chart might contain monthly hiring data for several years. If the main point is that hiring peaks in July, the figure can make that purpose explicit by:

  • Reducing unnecessary color differences.

  • Using a title that signals the comparison across years.

  • Highlighting July with a subtle band or other restrained visual cue.

  • Adding a concise annotation such as “Hiring peaks in July.”

The figure still needs to present the data accurately and provide sufficient context. The point of emphasis should help viewers find the relevant pattern, not conceal contradictory evidence.

A single figure may not be able to communicate every story in a complex dataset. Rather than forcing all messages into one crowded visualization, a set of figures can preserve the same axes and styling while highlighting different patterns in turn. Faded data can remain visible for context while selected lines and annotations draw attention to one particular industry or trend.


Sorting Categories to Reveal Patterns

Software often sorts categories alphabetically by default. Alphabetical order is helpful for finding a specific item in a long list, but it may obscure patterns when the values themselves are the subject of interest.

Sorting bars by value can:

  • Make comparisons easier to scan.

  • Reveal the distribution of values.

  • Establish a ranking, such as which states had the most sales.

The same principle applies to categories identified by arbitrary codes, such as patient IDs. Ordering observations by an identifier that carries no meaningful relationship to the data can make patterns harder to notice.

However, not all categories should be sorted by value. Some have a meaningful natural order, such as time periods or ordered stages. In those cases, preserving the natural order is usually more informative than ranking categories by size.


Making Tables Easier to Read

Tables are valuable for organized information and precise lookup, but they can conceal patterns and overwhelm readers. Several design choices can improve their readability.

Align text for easy reading

Left-align text in most table cells. Fully justified text, aligned at both left and right edges, can create large gaps between words and make lines difficult to read.

Centered text may be acceptable in some short headings, but centering multi-line text can make it harder to follow because each line begins in a different position. Consistent alignment helps readers know where to look next.

De-emphasize grid lines

Strong horizontal and vertical lines can dominate a table because the visual system is sensitive to high-contrast edges. Yet the values and text inside the cells usually matter more than the divisions between cells.

  • Remove grid lines that are not needed.

  • Use light gray rather than black for necessary rules.

  • Preserve enough structure to support scanning without making the grid the most prominent feature.

Establish visual hierarchy

A table should make the most important information easiest to notice. A useful hierarchy can include:

  • Low-priority elements that can be removed entirely.

  • Necessary but secondary elements in lighter gray.

  • Important labels and values in regular dark text.

  • The most important information in bold or otherwise clearly emphasized text.

This hierarchy reduces visual competition and helps readers understand where to begin.

Make numerical patterns visible

Conditional formatting can turn cell values into bars or color intensities. This can reveal trends that are difficult to see in a plain table—for example, flat values across one group and rising values across another.

Such treatments should be chosen carefully. Color intensities are not as precise as position or length for quantitative comparisons, so a cell bar or another position-based display may be preferable when exact differences matter.

Annotate the table’s purpose

A short annotation can explain why the table is included and which values are important—for example, identifying the significantly affected groups in a dataset. A large table without a clear point leaves viewers unsure where to look or what conclusion they should draw.


Choosing and Applying Color

Color can distinguish data categories and direct attention, but it can also impair readability or create false impressions.

Avoid overly bright, saturated colors

Highly saturated colors can be uncomfortable to look at and may compete for attention. If a poster or figure is unpleasant to view, audiences may not spend long enough with it to understand the message.

A palette with more muted colors is often easier to read and allows emphasis to be applied selectively.

Match the color scheme to the data

For nominal categories—categories with no inherent order, such as different kinds of fruit—use distinct hues rather than a sequential ramp. A ramp suggests that the categories have an order.

For ordinal or ordered data, such as years or ordered stages, a ramp from lighter to darker colors can communicate progression.

The color scheme should reflect the structure of the data rather than impose a structure that is not present.

Keep category colors consistent across figures

If a category is red in one figure, it should generally remain red in subsequent figures. Changing the mapping of colors—for example, using red for one country in one chart and another country in the next—forces viewers to relearn the visual key.

Consistent colors help audiences carry knowledge from one figure to another. When a different color is needed for a new category, it is usually better to preserve existing mappings and assign a new, distinct color.

Avoid rainbow color maps for numerical data

Rainbow palettes use a sequence of hues to represent numerical values. They can cause several problems:

  • The hue sequence does not provide an intuitive sense of numerical order.

  • Viewers often interpret changes in brightness more naturally than changes through a rainbow of hues.

  • The palette can create apparent stripes or boundaries in smoothly varying data, even when the underlying data has no such pattern.

A color map based on a perceptually ordered change in brightness or another coherent visual progression is generally preferable when encoding numerical values.


Text, Labels, and Figure Titles

Text in a figure should help viewers understand the data quickly. Extra text, awkward orientation, abbreviations, and excessive precision can all increase the effort required to interpret a chart.

Make labels readable

Diagonal or vertical labels can be difficult to read and can make it unclear which label belongs to which bar. When category names are long, a horizontal bar chart often works better: viewers can read labels normally, and each label aligns clearly with its bar.

Use clear, human-readable language

Figures should be understandable to people outside the researcher’s immediate specialty.

  • Spell out abbreviations when they may not be familiar.

  • Avoid unexplained jargon.

  • Replace internal column names or technical shorthand with labels that communicate meaning.

A technically correct label is not automatically a clear label. The goal is to help another person interpret the figure without specialized knowledge of how the data were stored or analyzed.

Use appropriate numerical precision

More decimal places do not necessarily make a figure more informative. Even if a digit is statistically significant, that does not mean the audience needs to see it.

Precision should serve the comparison being communicated. For example, values around 25%25\%25% and 36%36\%36% may be easier to understand than values reported as 24.46%24.46\%24.46% and 35.87%35.87\%35.87%, if the extra digits do not change the relevant interpretation.

Use titles to state the message

A title can tell viewers what to look for before they examine the detailed marks. Instead of only describing the variables shown—such as “Accuracy versus color and shape”—a title can state the result, such as “Accuracy improved by color, not by shape.”

A strong title:

  • Identifies the main finding or comparison.

  • Prepares the audience to interpret the figure.

  • Works with the visualization rather than replacing the evidence.

The chart must still provide enough context for viewers to assess the claim. A message-oriented title should clarify the figure, not overstate what the data show.


A Practical Design Checklist

Before presenting a figure or table, consider the following:

  • Purpose: What specific story or argument does it support?

  • Audience comparison: Which values or categories should viewers compare?

  • Chart type: Does the display use an effective encoding for that comparison?

  • Scale: Are axes and baselines appropriate, especially for bar charts?

  • Order: Does the category order reveal the pattern or preserve a meaningful sequence?

  • Color: Does color encode useful information or direct attention without creating confusion?

  • Labels: Are categories identified clearly and close to the marks they describe?

  • Complexity: Can unnecessary effects, grid lines, colors, or decimal places be removed?

  • Context: Can viewers understand the figure without relying on unexplained abbreviations or specialist jargon?

  • Accuracy: Does emphasis make the message easier to see without distorting the evidence?

Effective visualization is the result of deliberate choices about what the audience needs to see, not simply a chart type selected from a software menu.

Ask anything

We've read this whole study set, so questions about it get the best answers.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent