@@ -1611,7 +1611,8 @@ def _get_colorbars(self, row, col):
1611
1611
1612
1612
def _colorbar_visibility (self , visible , row , col ):
1613
1613
for cb in self ._get_colorbars (row , col ):
1614
- cb .visible = visible
1614
+ if cb is not None :
1615
+ cb .visible = visible
1615
1616
1616
1617
def show_colorbar (self , row = - 1 , col = - 1 ):
1617
1618
"""Show colorbar(s) for given plot
@@ -1937,7 +1938,8 @@ def save_montage(self, filename, order=['lat', 'ven', 'med'],
1937
1938
colorbars = self ._get_colorbars (row , col )
1938
1939
colorbars_visibility = dict ()
1939
1940
for cb in colorbars :
1940
- colorbars_visibility [cb ] = cb .visible
1941
+ if cb is not None :
1942
+ colorbars_visibility [cb ] = cb .visible
1941
1943
1942
1944
images = self .save_imageset (None , views , colorbar = colorbar , row = row ,
1943
1945
col = col )
@@ -1947,7 +1949,8 @@ def save_montage(self, filename, order=['lat', 'ven', 'med'],
1947
1949
# get back original view and colorbars
1948
1950
mlab .view (* current_view , figure = brain ._f )
1949
1951
for cb in colorbars :
1950
- cb .visible = colorbars_visibility [cb ]
1952
+ if cb is not None :
1953
+ cb .visible = colorbars_visibility [cb ]
1951
1954
return out
1952
1955
1953
1956
def animate (self , views , n_steps = 180. , fname = None , use_cache = False ,
0 commit comments