brainglobe-heatmap
brainglobe-heatmap allows you to create heatmaps, mapping scalar values for each brain region (e.g., number of labelled cells in each region) to a color and creating visualizations in 2D (using matplotlib or 3D (using brainrender).
2D heatmap generated using matplotlib - adapted from Fig 1. from Hansen et al (2025)
3D heatmap generated using brainrender
Usage
For full documentation, please see the BrainGlobe documentation. Examples can be found in the examples directory of this repository.
Quickstart
Installation
pip install brainglobe-heatmap
2D heatmap
import brainglobe_heatmap as bgh
values = dict( # scalar values for each region
TH=1,
RSP=0.2,
AI=0.4,
SS=-3,
MO=2.6,
PVZ=-4,
LZ=-3,
VIS=2,
AUD=0.3,
RHP=-0.2,
STR=0.5,
CB=0.5,
FRP=-1.7,
HIP=3,
PA=-4,
)
f = bgh.Heatmap(
values,
position=5000,
orientation="frontal",
vmin=-5,
vmax=3,
format="2D",
).show()
3D heatmap
import brainglobe_heatmap as bgh
values = dict( # scalar values for each region
TH=1,
RSP=0.2,
AI=0.4,
SS=-3,
MO=2.6,
PVZ=-4,
LZ=-3,
VIS=2,
AUD=0.3,
RHP=-0.2,
STR=0.5,
CB=0.5,
FRP=-1.7,
HIP=3,
PA=-4,
)
scene = bgh.Heatmap(
values,
position=(8000, 5000, 5000),
orientation="frontal",
thickness=1000,
vmin=-5,
vmax=3,
format="3D",
).show()
Seeking help or contributing
We are always happy to help users of our tools, and welcome any contributions. If you would like to get in contact with us for any reason, please see the contact page of our website.
Citing brainglobe-heatmap
If you use brainglobe-heatmap in your work, please cite it as:
Federico Claudi, Adam Tyson, Luigi Petrucco, Mathieu Bourdenx, carlocastoldi, Rami Hamati, & Alessandro Felder. (2024). brainglobe/brainglobe-heatmap. Zenodo. https://doi.org/10.5281/zenodo.10375287
If you use brainrender via brainglobe-heatmap (i.e. for 3D visualisation), please also cite it:
Claudi, F., Tyson, A. L., Petrucco, L., Margrie, T.W., Portugues, R., Branco, T. (2021) "Visualizing anatomically registered data with Brainrender" <i>eLife</i> 2021;10:e65751 [doi.org/10.7554/eLife.65751](https://doi.org/10.7554/eLife.65751)
BibTeX:
@article{Claudi2021,
author = {Claudi, Federico and Tyson, Adam L. and Petrucco, Luigi and Margrie, Troy W. and Portugues, Ruben and Branco, Tiago},
doi = {10.7554/eLife.65751},
issn = {2050084X},
journal = {eLife},
pages = {1--16},
pmid = {33739286},
title = {{Visualizing anatomically registered data with brainrender}},
volume = {10},
year = {2021}
}
Metadata
Release files for brainglobe-heatmap 0.7.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| brainglobe_heatmap-0.7.0.tar.gz | 20.5 kB | Without provenance | Details for brainglobe_heatmap-0.7.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| brainglobe_heatmap-0.7.0-py3-none-any.whl | Python 3 | none | any | Details for brainglobe_heatmap-0.7.0-py3-none-any.whl |
Total release size: 37.4 kB
Release files / brainglobe_heatmap-0.7.0.tar.gz
| Download URL | brainglobe_heatmap-0.7.0.tar.gz |
|---|---|
| Size | 20.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3b3fab85b43e06986365110fddfa8bbbe7549580a60f8e85a61c1377fe5dc532
|
|
BLAKE2b-256 checksum How to use checksums |
211ae4db721b98261c2d9cc395729a98c7e2ffd4da551ff6a07d7ff9264a4869
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / brainglobe_heatmap-0.7.0-py3-none-any.whl
| Download URL | brainglobe_heatmap-0.7.0-py3-none-any.whl |
|---|---|
| Size | 16.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
283e7b5874d4b7c6d97cb10ccef0968fdc8da9ce10356370916b6b574a148ecd
|
|
BLAKE2b-256 checksum How to use checksums |
34daaa73ccb60da3bd05796b867547383592baf8885c9735bb2ba5778d97cf60
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Security for brainglobe-heatmap 0.7.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.