Skip to main content

pheatmap-python

PyPI

Python version of pheatmap that runs on a faithful port of R's native grid graphics system instead of matplotlib.

  • 🎨 No matplotlib. Renders through grid_py's Cairo backend (PNG / PDF / SVG / PS / JPEG / TIFF / BMP).
  • 📐 Grammar of Graphics. Built on grid_py + gtable_py — the same primitives ggplot2 stands on.
  • 🧩 Abstract layout. Sizes stay as compound Unit expressions (1npc - rown_width - legend_width - …) and resolve at draw time.
  • 🎯 R is the gold standard. Behaviour almost like the pheatmap.r and verified against R reference renders.

Install

pip install pheatmap-python

Or, for a local development checkout:

git clone https://github.com/Bio-Babel/pheatmap-python.git
cd pheatmap_py
pip install -e ".[dev]"

Quick start

import numpy as np, pandas as pd
from pheatmap import pheatmap

test = pd.DataFrame(
    np.random.default_rng(1).standard_normal((20, 10)),
    index=[f"Gene{i+1}" for i in range(20)],
    columns=[f"Test{i+1}" for i in range(10)],
)

pheatmap(test)

See tutorials/pheatmap_tutorial.ipynb for a full walk-through.

Docs

pip install -e ".[docs]"
mkdocs serve

Release files for pheatmap-python 1.0.13.post1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for pheatmap-python 1.0.13.post1
File Interpreter ABI Platform
pheatmap_python-1.0.13.post1-py3-none-any.whl Python 3 none any Details

Release files / pheatmap_python-1.0.13.post1-py3-none-any.whl

Download URL pheatmap_python-1.0.13.post1-py3-none-any.whl
Size 32.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7c87fac4387b68382a1aacb0e62812cf7ec078bfeb06b37642dba76581063031
BLAKE2b-256 checksum
How to use checksums
4465f71c2a1ec5d5228a0fce3e7ebf58382879c98f3a46326fb0c3a7a0728624
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.15

Release history Release notifications | RSS feed

This release

1.0.13.post1 This release

1 release file

1.0.13

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page