Skip to content
svggalbraith

Galbraith (radial) plot

Which studies fall outside what one common effect would predict?

Demo data · seed 20261101 · 12 rows · default settings · 640 × 360SVG, lightSVG, darkDemo CSV

How to read it

  1. Read x as precision and y as the standardized estimate.
  2. Under a common effect, points fall within ±2 of the line.
  3. Points outside the band are the studies driving heterogeneity.
  1. Callout 1: The pooled slope.
  2. Callout 2: A study outside the band.
  3. Callout 3: The ±2 band.

Watch out

  • With few studies the band says little about what's typical.

Defaults

No settings: the chart draws one way.

Pinned in the code

  • Draws the meta-analysis engine's numbers as given (codesplash.stats.meta in Python ≡ codesplashr in R); the chart computes nothing statistical.
  • The line's slope is the common-effect estimate (engine control `slope`); the dashed lines are ±2 standard units, where ~95% of studies fall without heterogeneity.
  • Studies outside the band are coloured and labelled.
# Galbraith (radial) plot — Codesplash Chart Lab (recipe "galbraith")
# controls: defaults
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt

try:
    import codesplash as cs  # optional: the app's chart theme
except ImportError:
    cs = None
if cs:
    cs.use_codesplash(dark=False)
PALETTE = cs.palette(dark=False)["categorical"] if cs else plt.rcParams["axes.prop_cycle"].by_key()["color"]

df = pd.read_csv("galbraith-demo.csv", keep_default_na=False, na_values=[""])  # demo data (only empty cells are missing): Chart Lab → Code → Download demo CSV

_tokens = cs.palette(dark=False) if cs else {}
SEQ = _tokens.get("sequential", ["#eff6fd", "#1a469d"])  # sequential ramp (low → high)
DIV = _tokens.get("diverging", ["#c13e2e", "#f3f5f8", "#0859ac"])  # negative, midpoint, positive
REF = _tokens.get("reference", "#4e5661")
GREY = _tokens.get("dim", "#ced1d6")
Z = "standardized estimate"
PREC = "precision (1/SE)"
LABEL = "study"
SLOPE = 0  # the common-effect estimate
d = df.dropna(subset=[Z, PREC])
x_max = d[PREC].max() * 1.08
outside = (d[Z] - SLOPE * d[PREC]).abs() > 2
fig, ax = plt.subplots(figsize=(7, 5.5))
ax.fill_between([0, x_max], [2, SLOPE * x_max + 2], [-2, SLOPE * x_max - 2], color=GREY, alpha=0.35, lw=0)
ax.plot([0, x_max], [0, SLOPE * x_max], color=REF, linewidth=1)
ax.scatter(d[PREC], d[Z], s=28, c=[PALETTE[1] if o else PALETTE[0] for o in outside], zorder=3)
if LABEL:
    for _, r in d[outside].iterrows():
        ax.annotate(str(r[LABEL]), (r[PREC], r[Z]), fontsize=8, xytext=(4, 4), textcoords="offset points")
ax.set_xlabel(PREC)
ax.set_ylabel(Z)
plt.show()

Needs pandas, numpy, matplotlib · reads galbraith-demo.csv · app theme from the optional codesplash helper