Skip to content

Commit 7453156

Browse files
Add docstring to Heatmap constructor
1 parent 45dcf6e commit 7453156

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

Diff for: brainglobe_heatmap/heatmaps.py

+44
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,50 @@ def __init__(
6969
check_latest: bool = True,
7070
**kwargs,
7171
):
72+
"""
73+
Creates a heatmap visualization of the provided values in 3D or 2D
74+
using brainrender or matplotlib in the specified atlas.
75+
76+
Parameters
77+
----------
78+
values : dict
79+
Dictionary with brain regions acronyms as keys and
80+
magnitudes as the values.
81+
position : list, tuple, np.ndarray, float
82+
Position of the plane in the atlas.
83+
orientation : str or tuple, optional
84+
Orientation of the plane in the atlas. Either, "frontal",
85+
"sagittal", "horizontal" or a tuple with the normal vector.
86+
Default is "frontal".
87+
hemisphere : str, optional
88+
Hemisphere to display the heatmap. Default is "both".
89+
title : str, optional
90+
Title of the heatmap. Default is None.
91+
cmap : str, optional
92+
Colormap to use for the heatmap. Default is "Reds".
93+
vmin : float, optional
94+
Minimum value for the colormap. Default is None.
95+
vmax : float, optional
96+
Maximum value for the colormap. Default is None.
97+
format : str, optional
98+
Format of the heatmap visualization.
99+
"3D" for brainrender or "2D" for matplotlib. Default is "3D".
100+
thickness : float, optional
101+
Thickness of the slicing plane in the brainrender scene.
102+
Default is 10.
103+
interactive : bool, optional
104+
If True, the brainrender scene is interactive. Default is True.
105+
zoom : float, optional
106+
Zoom level for the brainrender scene. Default is None.
107+
atlas_name : str, optional
108+
Name of the atlas to use for the heatmap.
109+
If None allen_mouse_25um is used. Default is None.
110+
label_regions : bool, optional
111+
If True, labels the regions on the colorbar (only valid in 2D).
112+
Default is False.
113+
check_latest : bool, optional
114+
Check for the latest version of the atlas. Default is True.
115+
"""
72116
# store arguments
73117
self.values = values
74118
self.format = format

0 commit comments

Comments
 (0)