Skip to content

Commit

Permalink
Fix parsing heatmap args
Browse files Browse the repository at this point in the history
  • Loading branch information
bjhardcastle committed Nov 6, 2024
1 parent b298af7 commit 013cc74
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/dynamic_routing_analysis/plot_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -927,8 +927,12 @@ def plot_brain_heatmap(
# clean up inputs
regions = np.array(regions)
values = np.array(values)
if values.shape[0] == 2 and values.shape[1] != 2:
values = values.T
if sagittal_planes is None:
sagittal_planes = []
elif not isinstance(sagittal_planes, Iterable):
sagittal_planes = (sagittal_planes, )
else:
sagittal_planes = tuple(sagittal_planes) # type: ignore
if clevels is None:
Expand All @@ -937,7 +941,6 @@ def plot_brain_heatmap(
clevels = tuple(clevels) # type: ignore
if len(clevels) != 2:
raise ValueError("clevels must be a sequence of length 2")

# set up kwargs that are shared between all axes
joint_kwargs = {
'regions': regions,
Expand Down

0 comments on commit 013cc74

Please sign in to comment.