@@ -1890,10 +1890,10 @@ def save_imageset(self, prefix, views, filetype='png', colorbar='auto',
1890
1890
desired views for images
1891
1891
filetype: string
1892
1892
image type
1893
- colorbar: None | 'auto' | [ int], optional
1894
- if None no colorbar is visible. If 'auto' is given the colorbar
1895
- is only shown in the middle view. Otherwise on the listed
1896
- views when a list of int is passed .
1893
+ colorbar: 'auto' | int | list of int | None
1894
+ For 'auto', the colorbar is shown in the middle view (default).
1895
+ For int or list of int, the colorbar is shown in the specified
1896
+ views. For ``None``, no colorbar is shown .
1897
1897
row : int
1898
1898
row index of the brain to use
1899
1899
col : int
@@ -1909,6 +1909,8 @@ def save_imageset(self, prefix, views, filetype='png', colorbar='auto',
1909
1909
"Use show_view & save_image for a single view" )
1910
1910
if colorbar == 'auto' :
1911
1911
colorbar = [len (views ) // 2 ]
1912
+ elif isinstance (colorbar , int ):
1913
+ colorbar = [colorbar ]
1912
1914
images_written = []
1913
1915
for iview , view in enumerate (views ):
1914
1916
try :
@@ -1960,10 +1962,10 @@ def save_image_sequence(self, time_idx, fname_pattern, use_abs_idx=True,
1960
1962
applies if ``montage`` is a flat list).
1961
1963
border_size: int
1962
1964
Size of image border (more or less space between images).
1963
- colorbar: None | 'auto' | [ int], optional
1964
- If None no colorbar is visible. If 'auto' is given the colorbar
1965
- is only shown in the middle view. Otherwise on the listed
1966
- views when a list of int is passed .
1965
+ colorbar: 'auto' | int | list of int | None
1966
+ For 'auto', the colorbar is shown in the middle view (default).
1967
+ For int or list of int, the colorbar is shown in the specified
1968
+ views. For ``None``, no colorbar is shown .
1967
1969
1968
1970
Returns
1969
1971
-------
@@ -2009,10 +2011,10 @@ def save_montage(self, filename, order=['lat', 'ven', 'med'],
2009
2011
applies if ``order`` is a flat list)
2010
2012
border_size: int
2011
2013
Size of image border (more or less space between images)
2012
- colorbar: None | 'auto' | [ int], optional
2013
- if None no colorbar is visible. If 'auto' is given the colorbar
2014
- is only shown in the middle view. Otherwise on the listed
2015
- views when a list of int is passed .
2014
+ colorbar: 'auto' | int | list of int | None
2015
+ For 'auto', the colorbar is shown in the middle view (default).
2016
+ For int or list of int, the colorbar is shown in the specified
2017
+ views. For ``None``, no colorbar is shown .
2016
2018
row : int
2017
2019
row index of the brain to use
2018
2020
col : int
@@ -2042,6 +2044,8 @@ def save_montage(self, filename, order=['lat', 'ven', 'med'],
2042
2044
2043
2045
if colorbar == 'auto' :
2044
2046
colorbar = [len (views ) // 2 ]
2047
+ elif isinstance (colorbar , int ):
2048
+ colorbar = [colorbar ]
2045
2049
brain = self .brain_matrix [row , col ]
2046
2050
2047
2051
# store current view + colorbar visibility
@@ -2096,10 +2100,10 @@ def save_movie(self, fname, tstart=None, tstop=None, step=1,
2096
2100
applies if ``montage`` is a flat list)
2097
2101
border_size: int
2098
2102
Size of image border (more or less space between images)
2099
- colorbar: None | 'auto' | [ int], optional
2100
- if None no colorbar is visible. If 'auto' is given the colorbar
2101
- is only shown in the middle view. Otherwise on the listed
2102
- views when a list of int is passed .
2103
+ colorbar: 'auto' | int | list of int | None
2104
+ For 'auto', the colorbar is shown in the middle view (default).
2105
+ For int or list of int, the colorbar is shown in the specified
2106
+ views. For ``None``, no colorbar is shown .
2103
2107
framerate : float
2104
2108
Framerate of the movie (frames per second).
2105
2109
codec : str
0 commit comments