Tutorials › Population Pharmacokinetics › Readable Overlays of Subject Concentration Profiles

Exploratory Data Analysis · Tutorial 59 of 599

Readable Overlays of Subject Concentration Profiles

Choose and configure overlay displays that reveal individual concentration profiles without concealing their variation or implying more than the data support.

Intermediate 10 min read

What You'll Learn

  • Identify when many individual concentration-time curves are obscuring one another.
  • Explain how line transparency changes the appearance of dense overlays.
  • Select and report subject profiles using a reproducible, non-cherry-picked rule.
  • Configure small multiples so subjects are easy to inspect and panels remain comparable.
  • Diagnose visual distortions caused by axis choices, missing records, or dense plotting.
  • Choose an overlay strategy that fits the display purpose and the data.

Why Profile Overlays Become Hard to Read

An individual concentration-time plot can reveal a subject’s observed concentrations and their sequence over time. When many subjects share one set of axes, however, curves can cross, overlap, and hide one another. The display may become a dark tangle in which neither individual trajectories nor the spread of observed profiles is easy to inspect. The goal of a readable overlay is not to make every line equally prominent; it is to show how profiles relate while retaining enough detail to detect unusual trajectories, gaps, and differences in sampling.

Let \(C_{ij}\) denote the observed concentration for subject \(i\) at time \(t_{ij}\), where \(j\) indexes that subject’s observations. An individual profile is a plot of the paired values \((t_{ij}, C_{ij})\) for one subject. A line connecting successive observations is a visual guide between recorded points; it does not establish that concentrations were measured continuously or that the connecting path is the true concentration curve.

Before overlaying profiles, confirm that the time variable has a coherent meaning across subjects, such as time since dose, and that concentration and time use consistent units. If subjects have different relevant dosing or sampling contexts, make those contexts explicit rather than treating all curves as directly comparable. Use a linear or logarithmic concentration axis that suits the display; the earlier material on Log-Scale Individual Concentration-Time Plots covers the interpretation of that choice.

Definition: A subject-profile overlay places observations or connected profiles from multiple subjects on common axes. A display is readable when its visual encoding allows the intended features—such as individual trajectories, broad overlap, or exceptional profiles—to be inspected without suggesting unsupported precision or hiding important records.

Three Strategies for Dense Overlays

The main options are to draw all profiles with transparency, show a deliberately selected subset, or give subjects separate panels in a small-multiple display. These approaches solve different problems. Transparency retains all subjects on one set of axes, selection reduces visual load at the cost of omitting profiles from view, and small multiples preserve individual separation at the cost of space.

With transparency, each line is drawn with opacity \(\alpha\), where \(0<\alpha\leq 1\). On a white background, repeated strokes of the same color darken where they overlap. Under ordinary alpha compositing, the combined opacity of \(m\) exactly overlapping strokes is:

$$ a_m=1-(1-\alpha)^m $$

This is a display calculation, not a statistical estimate. It assumes the same opacity and color for every stroke and exact overlap at the location considered. In a real plot, lines often only partly overlap, have different positions, or cross at different points. Therefore, darkness can suggest where strokes accumulate, but it is not a calibrated count of subjects and should not be read as a concentration distribution.

A selected-subject display is useful when the purpose is to inspect individual trajectories and a full overlay is too crowded. The selection rule should be stated and reproducible—for example, a random sample generated with a recorded seed, or a prespecified selection of subjects with particular sampling patterns. Do not select subjects because their profiles make a preferred story look convincing. A subset can illustrate individual shapes, but it cannot stand in for all subjects unless its representativeness is justified for the intended purpose.

Small multiples use a separate panel for each subject, usually with common axis limits. They reduce direct line overlap and make it easier to associate observations with a subject. Their cost is a larger figure, smaller panels, and the possibility that many panels will overwhelm the reader. Shared scales are especially important when the purpose is to compare plotted magnitudes across panels; independently scaled axes can make profiles look more similar or more different than their concentrations warrant.

Worked Examples

Worked Example: Choosing Transparency for a Dense Overlay

Suppose a hypothetical display has 30 subject profiles. To reduce visual weight, the analyst sets each line’s opacity to \(\alpha=0.12\). At a point where all 30 lines exactly overlap, what combined opacity does the compositing formula imply?

Substitute \(m=30\) and \(\alpha=0.12\):

$$ a_{30}=1-(1-0.12)^{30} =1-0.88^{30} \approx 1-0.0216 =0.9784 $$

Thus, at an exactly coincident point, the combined opacity is about 0.9784, or 97.84%. A line opacity of 0.12 can still produce a nearly opaque patch when many strokes accumulate. This calculation cautions against assuming that a low individual opacity will prevent saturation everywhere. It does not mean 97.84% of subjects have that concentration, nor does it tell us how many subjects overlap in an ordinary, partially coincident plot.

Worked Example: Selecting Subjects Reproducibly

A hypothetical dataset contains 48 subjects, and a full overlay is too crowded for inspection of individual trajectories. The analyst generates a random permutation of the 48 subject identifiers using a recorded random seed, then takes the first eight identifiers. Suppose the resulting selection is S03, S07, S11, S16, S22, S29, S34, and S45. What fraction of the subjects is shown, and what should the caption say?

The displayed fraction is:

$$ \frac{8}{48}=\frac{1}{6}\approx 0.1667=16.67\% $$

The plot shows eight of 48 subjects, or about 16.67%. A suitable caption would state that eight subjects were selected by a seeded random sample, give the seed or the selection list, and identify the concentration and time units. The selection is reproducible, but it is still a subset: the figure alone cannot establish that the eight trajectories capture every feature of the 48-subject dataset. A companion statement of the full subject count helps prevent readers from mistaking the display for a complete overlay.

Worked Example: Planning a Small-Multiple Layout

For a hypothetical set of 15 subjects, an analyst plans a figure that is 12 inches wide and 10 inches high. The panels will be arranged in three columns and five rows, with 0.25-inch gaps between columns and between rows. What is the approximate size of each panel before space for labels and margins is allowed?

The three columns have two horizontal gaps, so the panel width is:

$$ \frac{12-2(0.25)}{3} =\frac{11.5}{3} \approx 3.833\text{ inches} $$

The five rows have four vertical gaps, so the panel height is:

$$ \frac{10-4(0.25)}{5} =\frac{9}{5} =1.800\text{ inches} $$

Each plotting panel is approximately 3.833 by 1.800 inches before accounting for axis labels, panel labels, and outer margins. The height is relatively constrained, so the analyst should check whether points and lines remain distinguishable at the intended display size. All panels should use the same time and concentration limits if cross-panel magnitude comparisons are intended.

How to Build and Check the Display

A reliable overlay begins with the intended visual question. If the aim is to inspect all observed trajectories together, start with all subjects and consider transparency. If the aim is to show examples of individual profile shapes, select subjects according to a transparent rule. If the aim is to inspect subjects one by one while retaining direct visual comparability, use small multiples. These are display choices, not methods for estimating a typical profile.

1
Confirm the plotting records.
Check that each point belongs to the correct subject and that time, concentration, dose context, and units are coherent. Sort each subject’s records by time before connecting observations.
2
Choose the intended comparison.
Decide whether the figure should show all subjects together, a reproducible subset, or separate subject panels. State how many subjects the display includes.
3
Choose readable encodings.
Set line weight and transparency, or panel count and layout, so points and trajectories remain visible at the figure’s final size. Label axes with units and make the concentration scale clear.
4
Inspect for misleading artifacts.
Check whether overplotting hides observations, whether selected subjects were chosen fairly, and whether panel scales or missing records could change the visual interpretation.

Connecting observations requires care. Connect points within a subject only, and in time order. Do not draw a line across records that represent different dosing occasions or a substantial interruption if that connection would imply a continuous observed trajectory. Avoid inventing values to fill gaps. Where an observation is censored or otherwise not a measured numerical concentration, do not plot it as an exact zero merely to complete a line.

Inspect the plot at the size at which it will be read, not only while zoomed in on a large screen. Look for dark saturated regions, points hidden beneath lines, indistinguishable colors, and panels whose labels or tick marks cannot be read. If a sparse set of subjects appears unusually tidy, verify that the selection procedure did not inadvertently favor complete profiles or a narrow range of observed behavior. A clear caption should describe the plotted population of records, any subset selection, axis transformations, and relevant units.

Comparison, Limitations, and Common Pitfalls

StrategyBest suited toMain limitation
Transparent lines on common axesShowing all profiles together while reducing the visual weight of isolated strokesDense overlap can still saturate; darkness is not a calibrated subject count
Selected subjects on common axesInspecting individual trajectory shapes when all profiles would be too crowdedUnshown subjects may differ; a subset can mislead if selection is not disclosed or fair
Small multiplesSeparately inspecting many subjects while retaining comparable axesRequires space; panels can become too small, and independent axes weaken comparisons
Opaque overlay of all profilesShowing a small number of subjects with clearly distinguishable linesWith many subjects, later strokes can conceal earlier ones and create a cluttered figure

No strategy eliminates the need to interpret the display in context. Transparency can make dense regions appear like a surface even though the data are discrete subject records. A selected overlay cannot show subjects who were omitted. Small multiples can encourage rapid scanning but make subtle comparisons difficult when the figure is too large or the panels too small. If there are many subjects, a single figure may not be able to show every record legibly; use complementary displays rather than forcing all purposes into one plot.

A common mistake is to interpret a dark patch in a transparent overlay as proof that many subjects had nearly the same concentration. The reasoning is that darker color must directly encode the number of subjects. The correction is that darkness depends on line opacity, color, stroke width, exact overlap, and rendering; the compositing formula describes only an idealized point of exact overlap. Treat dark regions as a prompt to inspect the profiles, not as a numerical frequency summary.

Key takeaway: Use transparency to retain all profiles, a reproducible subject subset to reduce clutter, or small multiples to separate trajectories. State what is shown, keep comparisons on appropriate common axes, and treat the appearance of an overlay as a visual diagnostic rather than a statistical summary.

Check Your Understanding

Answer each question, then compare your reasoning with the solutions below.

  1. A hypothetical overlay uses line opacity \(\alpha=0.20\). Under exact overlap, calculate the combined opacity for five strokes using \(a_m=1-(1-\alpha)^m\).
  2. A dataset has 60 subjects, and a seeded random sample of 12 is plotted. What percentage of subjects is displayed, and what should be made clear to readers?
  3. Why can separate panels with independently chosen vertical axes distort comparisons of concentration magnitude?
  4. What is wrong with connecting all concentration records in the order they appear in a file, rather than sorting and grouping by subject?

Solutions. (1) Substitute \(m=5\) and \(\alpha=0.20\): \(a_5=1-(1-0.20)^5=1-0.8^5=1-0.32768=0.67232\). The combined opacity is approximately 0.6723, or 67.23%, under the exact-overlap assumptions. (2) The displayed fraction is \(12/60=0.20=20\%\). The caption should identify the plot as a seeded random subset, state that 12 of 60 subjects are shown, and report the selection procedure or seed so the display is not mistaken for the full dataset. (3) Independent vertical limits can make the same absolute concentration occupy different fractions of panel height, or make different concentrations look similarly high. Shared vertical limits are needed when visual comparison of magnitudes across panels is intended. (4) File order may interleave subjects and may not be chronological. Connecting that sequence can create lines between different subjects or reverse the time order, producing trajectories that do not represent any subject. Group records by subject and sort each subject’s observations by time before connecting them.

Clinical Biostats