Requires matplotlib (2.1.0) and numpy (1.12.1).
From the Wikipedia article: A Bland–Altman plot ... is a method of data plotting used in analyzing the agreement between two different assays.
Bland and Altman et al. has been cited over 20,000 times.
- Place
bland_altman.py
in your working directory. - To load the function into your Python script or Jupyter notebook, run
from .bland_altman import bland_altman_plot
from .bland_altman import bland_altman_plot
import numpy as np
# Seed the random number generator.
# This ensures that the results below are reproducible.
np.random.seed(9999)
m1 = np.random.random(20)
m2 = np.random.random(20)
my_bland_altman_plot = bland_altman_plot(m1, m2)
This should produce the following image.