Skip to content

Commit e199dd3

Browse files
author
dengemann
committed
fix colorbar bug
1 parent 7dcbc09 commit e199dd3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

surfer/viz.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1621,8 +1621,9 @@ def _get_colorbars(self, row, col):
16211621
if len(self.overlays_dict) > 0:
16221622
for name, obj in self.overlays_dict.items():
16231623
for bar in ["pos_bar", "neg_bar"]:
1624-
try:
1625-
colorbars.append(getattr(obj[ind], bar))
1624+
try: # deal with positive overlays
1625+
this_ind = min(len(obj) - 1, ind)
1626+
colorbars.append(getattr(obj[this_ind], bar))
16261627
except AttributeError:
16271628
pass
16281629
return colorbars

0 commit comments

Comments
 (0)