Skip to main content

Lightweight Bland–Altman plot implementation for method comparison

Project description

Bland-Altman Plot

A lightweight Python library for generating Bland-Altman Plots to evaluate agreement between two measurements methods. This implementation provides a simple interface for quickly visualizing bias and limits of agreements.

Installation

Install from PyPI

pip install bland-altman

Usage

import numpy as np
from bland_altman import bland_altman_plot

# Generate example data
np.random.seed(42) 
x = np.random.normal(100,10,500)
y = x + np.random.normal(0,5,500)

# Generate Bland-Altman plot
bland_altman_plot(x, y, ylim=(-20, 20), figsize=(10,6), label_offset=0.025, color='blue', alpha=0.5, display_grid=True, display_legend=True)

Example Plot

Below is an example Bland-Altman plot generated using this library.


Features

  • Simple and easy-to-use API
  • Automate calculation of mean difference and limits of agreement
  • Customizable plot appearance
  • Buit using Numpy and Matplotlib

Requirements

  • Python 3.8+
  • NumPy
  • Matplotlib

These dependencies will be installed automatically with the package.


License

This project is licensed under MIT License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bland_altman-0.1.3.tar.gz (5.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bland_altman-0.1.3-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file bland_altman-0.1.3.tar.gz.

File metadata

  • Download URL: bland_altman-0.1.3.tar.gz
  • Upload date:
  • Size: 5.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.5

File hashes

Hashes for bland_altman-0.1.3.tar.gz
Algorithm Hash digest
SHA256 27eab4a1582630fc0101314f0025dabf54c72d58c9084985363d5805bd52778a
MD5 df1d578ee9ed199f24733744787c46f4
BLAKE2b-256 25032b0b21abc77499fbdc26eff297eb4c3b413915bdbd3ccbf81226c0e9bf92

See more details on using hashes here.

File details

Details for the file bland_altman-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: bland_altman-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 5.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.5

File hashes

Hashes for bland_altman-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 f7835a39e31c9401d31f9ddd8eeb5f790bc830fdda120b77de2bec4dab629592
MD5 add1d18175d746d0f6f5363637464840
BLAKE2b-256 3ee108fd3b9ba9f016e79758e5f52c495e9464dd9ef51a131db8ab79769977d5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page