Trace paired measurements through the X–Y plane without inventing observations across missing periods or interpreting loops as proof of causation.
Connected scatterplots: preserve time order, gaps and trajectory direction
Make two measures and one clock explicit
A connected scatterplot places one quantitative measure on the horizontal axis and another on the vertical axis, then joins observations in chronological order. Time is encoded by the path rather than either axis. That separates it from an ordinary time-series line chart, whose horizontal axis is time, and from an unconnected scatterplot, which contains no ordered journey. Use it when the question concerns how two measures move together across successive periods: did both rise, did one lead the other, and did the system return to a former combination? Put the units, measurement grain and time-step rule next to the chart. Two plotted values must refer to the same entity and period; pairing this week's costs with last week's outcomes by accident can create a false loop. Chart encoding, grain rules and period alignment should be fixed first.
Order the path by time, never by X value
Many plotting libraries connect points in input order. A database result without an explicit time sort can therefore produce a different path on a second run. Sort by a unique, declared period key and reject duplicate observations unless the aggregation policy specifies how to combine them. Mark the start and end, add sparse period labels and draw direction arrows where a reversal would otherwise be ambiguous. An arrow points forward through time, not necessarily toward increasing X or Y. Keep both numeric axes stable across compared groups. If a measure can be negative, retain a meaningful zero line when that helps interpretation; do not force both axes to zero merely to fill a square frame. The worked contract returns ordered points and allowable segments so a renderer cannot accidentally reorder them. Axis integrity and shared-scale panels protect comparisons.
Break at unobserved periods
A straight segment from period 48 to period 50 suggests a continuous movement through the middle even when period 49 was never measured. Break the line at that gap or draw a distinctly styled connection with a documented interpolation rule. The simple contract below only connects consecutive integer periods. It leaves points after a gap visible but starts a new path. For irregular calendars, a consecutive integer is not enough: use an explicit sequence of expected periods that incorporates holidays, fiscal weeks or excluded maintenance windows. A blank period is not a zero measurement. Nor should the line skip a failed sensor silently. Show completeness counts and use a companion pair of ordinary time-series charts when it matters which variable changed during a gap. Calendar and provisional-period rules describe that boundary.
Read shape without claiming a mechanism
A path heading northeast means both measures increased between adjacent observations. A loop means the pair revisited a part of the X–Y plane after taking a different route. It may be consistent with lag, seasonality, changed population mix or measurement timing; the shape alone cannot choose among them. Large jumps can dominate the path and hide small movements, while overlapping segments can make direction hard to follow. Annotate major period boundaries, then test the story against the original separate time series. If many entities are present, one dense web is rarely legible; use a few labeled trajectories or small multiples. Avoid animation as the only route to chronology, and provide an ordered table of period, X and Y. Animation controls, accessible text and causal-claim limits remain relevant.
Worked contract
from math import isfinite
def paired_trajectory(readings: list[tuple[int, float, float]]):
if not readings:
raise ValueError("at least one paired period is required")
seen = set()
for period, acquisition_cost, activation_rate in readings:
if (not isinstance(period, int) or period in seen or
not isfinite(acquisition_cost) or acquisition_cost < 0 or
not isfinite(activation_rate) or not 0 <= activation_rate <= 1):
raise ValueError("periods must be unique; paired measures must be valid")
seen.add(period)
points = sorted(readings)
segments = [(earlier, later)
for earlier, later in zip(points, points[1:])
if later[0] == earlier[0] + 1]
gaps = [(earlier[0], later[0])
for earlier, later in zip(points, points[1:])
if later[0] != earlier[0] + 1]
return points, segments, gaps
weekly_acquisition = [(50, 83.0, 0.59), (47, 71.0, 0.47),
(48, 79.0, 0.53), (51, 77.0, 0.64)]
points, segments, gaps = paired_trajectory(weekly_acquisition)
assert [period for period, _, _ in points] == [47, 48, 50, 51]
assert [(start[0], end[0]) for start, end in segments] == [(47, 48), (50, 51)]
assert gaps == [(48, 50)]
assert points[-1][2] == 0.64Performance and operating cost
For N paired periods, validation takes O(N) expected time, sorting takes O(N log N), and segment construction takes O(N). The duplicate-key set, sorted points and segment ledger use O(N) space. In the worked data, the input arrives out of order, but the output orders periods 47, 48, 50 and 51. The chart draws segments from 47 to 48 and from 50 to 51; it refuses to suggest an observed route through missing period 49. The activation rate rises to 0.64 by the final period even though acquisition cost falls from 83 to 77 between 50 and 51. Those are adjacent descriptive changes, not an estimated causal effect.
Common Mistakes
- Connecting points in database-return order or sorting by the horizontal measure.
- Pairing measures from different cohorts or period definitions.
- Drawing a solid segment through an unobserved period without an interpolation rule.
- Calling a loop evidence that one measure caused a delayed change in the other.
Validation drill
Track 83 weekly cost and activation pairs for one stable cohort. Audit duplicate weeks, mark every break in the expected calendar, label start and end, then compare the trajectory with two ordinary time-series charts before interpreting a loop.
Read next
- Time-series charts: distinguish missing days, zeros and provisional periods
- Event-aligned charts: choose a baseline before comparing trajectories
- Small multiples: compare groups with honest scales and facet order
- Chart annotations: align events to the right clock without claiming causality
