Python port of the R pheatmap package (tracks R pheatmap 1.0.13)
Project description
pheatmap-python
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
Unitexpressions (1npc - rown_width - legend_width - …) and resolve at draw time. - 🎯 R is the gold standard. Behaviour almost like the
pheatmap.rand 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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pheatmap_python-1.0.13.post1-py3-none-any.whl.
File metadata
- Download URL: pheatmap_python-1.0.13.post1-py3-none-any.whl
- Upload date:
- Size: 32.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7c87fac4387b68382a1aacb0e62812cf7ec078bfeb06b37642dba76581063031
|
|
| MD5 |
f5da20efc8631d0df22ab53d229cbcb5
|
|
| BLAKE2b-256 |
4465f71c2a1ec5d5228a0fce3e7ebf58382879c98f3a46326fb0c3a7a0728624
|