File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -196,8 +196,7 @@ def plot_carpet(
196
196
"whole brain (voxels)" : list (range (data .shape [0 ]))
197
197
}
198
198
199
- nsegments = len (segments )
200
- if nsegments == 1 :
199
+ if len (segments ) == 1 :
201
200
legend = False
202
201
203
202
if cmap is None :
@@ -256,7 +255,7 @@ def plot_carpet(
256
255
257
256
# Define nested GridSpec
258
257
gs = mgs .GridSpecFromSubplotSpec (
259
- nsegments ,
258
+ len ( segments ) ,
260
259
1 ,
261
260
subplot_spec = subplot ,
262
261
hspace = 0.05 ,
@@ -294,7 +293,7 @@ def plot_carpet(
294
293
ax .set_yticks ([])
295
294
ax .grid (False )
296
295
297
- if i == (nsegments - 1 ):
296
+ if i == (len ( segments ) - 1 ):
298
297
xlabel = "time-points (index)"
299
298
xticklabels = (xticks * n_trs / data .shape [- 1 ]).astype ("uint32" ) + drop_trs
300
299
if tr is not None :
@@ -318,7 +317,7 @@ def plot_carpet(
318
317
if title and i == 0 :
319
318
ax .set_title (title )
320
319
321
- if nsegments == 1 :
320
+ if len ( segments ) == 1 :
322
321
ax .set_ylabel (label )
323
322
324
323
if legend :
You can’t perform that action at this time.
0 commit comments