If I understand the conspiracy theory correctly, this code should provide the basic plotting, while you can configure it for your own needs.
import matplotlib.pyplot as plt import numpy as np def bland_altman_plot(data1, data2, *args, **kwargs): data1 = np.asarray(data1) data2 = np.asarray(data2) mean = np.mean([data1, data2], axis=0) diff = data1 - data2
The corresponding elements in data1 and data2 are used to calculate the coordinates for the plotted points.
Then you can create a schedule by doing, for example,
from numpy.random import random bland_altman_plot(random(10), random(10)) plt.title('Bland-Altman Plot') plt.show()

hooy
source share