Tutorials › Regression Analysis (Undergraduate) › Comparing Groups With Faceted Scatterplots

Visualizing Relationships · Tutorial 53 of 991

Comparing Groups With Faceted Scatterplots

Learn to set up and read faceted scatterplots so group comparisons remain clear, fair, and tied to the observed data.

Beginner 9 min read

What You'll Learn

  • Identify when a categorical grouping variable can be displayed with separate scatterplot panels
  • Set common axis limits and breaks so positions have the same meaning in every panel
  • Compare group-specific point patterns without treating visual differences as causal effects
  • Decide how to handle sparse groups, unused categories, and missing values
  • Recognize when faceting clarifies a display and when it makes comparisons harder

Why Separate Panels Can Help

A scatterplot can show how a quantitative response varies with a quantitative predictor. When the observations also belong to categories—such as treatment type, region, or machine setting—one plot may become crowded. Points from different groups can overlap, and it may be difficult to see whether the groups have similar or different patterns.

A faceted scatterplot addresses this by arranging a separate panel for each category level. Each panel contains the observations for that group. When all panels use the same horizontal and vertical scales, a given position means the same predictor and response values everywhere. This makes visual comparison possible while leaving individual observations visible.

Definition: A faceted scatterplot is a set of scatterplot panels arranged in a common display, with observations divided among panels according to the levels of a categorical grouping variable. In a shared-scale faceted scatterplot, every panel uses the same predictor-axis limits and the same response-axis limits.

The grouping variable determines which panel receives each observation. The predictor remains on the horizontal axis and the response remains on the vertical axis in every panel. Faceting does not change the data values; it changes how the points are organized on the page.

What Shared Axes Make Comparable

Suppose every panel has the same width and height, and the horizontal limits run from \(a\) to \(b\). A predictor value \(x\) is then placed at the same relative horizontal position in every panel. For example, a value halfway between \(a\) and \(b\) is halfway across each panel. The same reasoning applies to the response axis.

More formally, if \(u\) denotes the relative horizontal position in a panel, then under common limits it is given by the same mapping for every group:

$$ u = \frac{x-a}{b-a} $$

For the response, if the common vertical limits are \(c\) and \(d\), the relative position is determined by the same mapping in each panel:

$$ v = \frac{y-c}{d-c} $$

Thus, the same \(x\) and \(y\) values occupy the same relative position across panels. If each group instead receives separate limits, the mappings can differ by group: identical-looking positions might represent different values, and different-looking patterns can result from the rescaling rather than from the observations. Shared axes do not guarantee that every comparison is informative, but they provide a consistent visual reference.

Key result: To compare the locations and shapes of group-specific point patterns directly, use the same predictor and response limits in every panel. Label the axes with units, and make the panel scales easy to check.

Building and Reading a Faceted Display

Before plotting, identify the variables and their roles. There should be a quantitative predictor, a quantitative response, and a categorical grouping variable. Then assign one panel to each group level, plot each observation at its predictor-response coordinates, and use common axes. Give each panel a clear group label and retain the same axis titles and units throughout the display.

When comparing panels, first check the scales. Then compare what is visible in the point clouds: where observations occur, whether the points appear to rise or fall across the predictor range, whether the patterns bend, and how much vertical spread is visible. These are visual descriptions, not proof that a group caused the response to change. Differences may reflect other variables, the way observations were collected, or chance variation.

Worked Example: Comparing Study-Time Patterns by Course Format

Hypothetical data. A teaching team records weekly study time in hours and a quiz score out of 100 for six students in each of two course formats. The rows below give the plotted coordinates; each row is one student.

FormatStudy time (hours)Quiz score (points)
In person158
In person263
In person365
In person472
In person576
In person678
Online155
Online261
Online364
Online466
Online574
Online677

Set up the display. Put study time, in hours, on the horizontal axis and quiz score, in points, on the vertical axis. Use one panel for In person and one for Online. Since both groups have study times from 1 to 6 hours and scores from 55 to 78 points, a common horizontal range such as 0 to 7 hours and a common vertical range such as 50 to 85 points include all the listed observations. Label both axes with their units.

Read the panels. In the In person panel, place the six points at (1, 58), (2, 63), (3, 65), (4, 72), (5, 76), and (6, 78). In the Online panel, plot (1, 55), (2, 61), (3, 64), (4, 66), (5, 74), and (6, 77). Both panels show higher scores at larger study times among these observations. The shared scales also make it possible to compare scores at the same study time: at 4 hours, the plotted scores are 72 points in person and 66 points online. That is a difference in these recorded observations, not evidence that course format caused a score difference.

Check the comparison. If each panel had been scaled separately, 72 could appear at a similar height to 66 even though the values differ. With common limits, their vertical positions reflect their actual scores on the same scale. The conclusion is limited to the displayed observations; the plot alone does not establish a population-level difference.

Choosing Limits and Panel Layout

Choose limits that include the observations you intend to show, and use those limits in every panel. Setting limits too narrowly can conceal valid observations or make the display misleading. Setting them much wider than the data can compress the points into a small region. A practical choice usually includes the full relevant data range with a modest amount of space at the edges, while keeping the same limits for every group.

Axis breaks should also be consistent. If one panel labels the response axis at intervals of 10 points and another at intervals of 5 points, comparisons require extra effort and can be misread. Use the same break locations and labels across panels, and do not omit zero or other values in a way that changes what the display suggests without a clear reason.

Panel arrangement matters too. Arrange category levels in an order that readers can follow, such as a natural order for categories that have one or a meaningful sequence. Otherwise, use a simple, documented order. Keep panel sizes comparable. A group with very few observations may leave much of its panel empty; that is not a reason to stretch its axes independently. It is a cue to report the small number of observations and interpret its visible pattern cautiously.

If observations overlap within a panel, the earlier material on jitter and transparency describes ways to make overlapping points more visible. These techniques can help, but jitter slightly changes displayed positions, so it should not obscure the scale or be mistaken for additional measurement precision. Faceting itself does not solve overlap among observations that share similar coordinates within the same group.

Worked Example: Choosing a Common Scale Across Regions

Hypothetical data. A planner records weekly water use in cubic metres and weekly rainfall in millimetres for four weeks in each of two regions. The observed rainfall values are 10, 20, 30, and 40 mm in both regions. The water-use values are 80, 75, 72, and 68 cubic metres in the North, and 60, 58, 55, and 54 cubic metres in the South.

Assign the axes and panels. Use rainfall (mm) as the horizontal predictor, water use (cubic metres) as the vertical response, and region as the grouping variable. Make one panel for North and one for South. Each panel contains four points: North has (10, 80), (20, 75), (30, 72), and (40, 68); South has (10, 60), (20, 58), (30, 55), and (40, 54).

Choose common limits. A horizontal range of 0 to 50 mm includes all rainfall values. A vertical range of 45 to 85 cubic metres includes all water-use values in both groups. Use these same two ranges and the same labelled breaks in both panels. Because rainfall values match across regions, the points can be compared at each recorded rainfall value; for example, at 30 mm, the plotted water use is 72 cubic metres in the North and 55 cubic metres in the South.

Interpret with care. The displayed North observations have higher water-use values than the South observations at the four listed rainfall amounts. The plot does not tell us why, and these hypothetical records do not establish that region itself explains the difference. A separate scale for each region could make their vertical locations appear more similar, so it would work against the intended comparison.

When Faceting Is Useful—and When It Is Not

Faceting is especially useful when the groups would otherwise obscure one another, when each group has enough observations to show a pattern, or when the reader needs to inspect group-specific data rather than only a group summary. It makes group membership explicit by placing observations in separate panels instead of combining them into a single cloud.

A single shared set of axes can also expose limitations. If one group occupies only a small portion of the overall predictor or response range, its points may be visually compressed. If a group has many fewer observations than others, its panel may look less informative. These are properties of the data and display, not reasons to silently change scales. State the observation counts when they help readers judge how much evidence each panel contains.

Worked Example: Handling a Sparse Group

Hypothetical data. A quality-control team records the number of machine operating hours and the number of units rejected during a shift for three machine settings. Setting A has observations (2, 3), (4, 4), (6, 5), and (8, 7); Setting B has (2, 2), (4, 3), (6, 5), and (8, 6); Setting C has only one observation, (4, 4). The first coordinate is operating hours and the second is rejected units.

Set up the display. Put operating hours on the horizontal axis and rejected units on the vertical axis. Make three panels, one for each setting, and use common limits such as 0 to 10 hours horizontally and 0 to 8 rejected units vertically. Plot all nine observations in their assigned panels. The Setting C panel has exactly one point at (4, 4).

State what can be compared. At 4 operating hours, the recorded rejection counts are 4 for Setting A, 3 for Setting B, and 4 for Setting C. The shared axes make those values directly comparable in the display. However, a single point in Setting C does not reveal how rejection counts vary across operating hours for that setting. It would be unjustified to describe a group pattern for Setting C from one observation.

Report the limitation. Note that the panel for Setting C contains one observation, while the other panels contain four each. Keep the common scales so that plotted coordinates retain the same meaning, and avoid implying that the sparse panel provides evidence comparable to the others.

Common Mistakes

  • Using different axis limits without making the change unmistakable. Identical positions can then represent different values. For direct comparisons, use common limits and breaks.
  • Comparing panels before checking their scales. First confirm that the axes have the same units, limits, and breaks; only then compare point locations.
  • Assuming that separate panels remove all overlap. Faceting separates categories, but points can still overlap within each category. Use an appropriate display adjustment when needed, and explain it.
  • Treating a visual group difference as a causal effect. A faceted scatterplot displays observed relationships. It does not by itself rule out other explanations or establish that group membership caused a difference.
  • Reading a sparse panel as if it showed a stable pattern. A panel with one or two observations offers limited information about that group. Show the observations and make the limitation clear.
Key takeaway: Faceting organizes observations by category so group-specific scatterplots can be inspected side by side. Shared predictor and response scales preserve a common visual reference; clear labels, adequate context, and cautious interpretation make the comparison useful.

Check Your Understanding

Use the questions below to check how you would construct and interpret a faceted scatterplot.

  1. A data set records hours of exercise, resting pulse rate, and exercise program for each participant. Which variables belong on the axes, and which variable defines the panels?
  2. Why should the predictor and response limits be the same across panels when the goal is to compare group patterns?
  3. Two groups have observations at the same predictor value, but one group's response values are higher. What can the faceted display show, and what can it not establish by itself?
  4. One category has only one observation. How should that panel be displayed and interpreted?
  5. What should you check before comparing the vertical positions of points in different panels?