Skip to content

Commit 6b08e27

Browse files
committed
Merge pull request #2010 from teonlamont/projs_topomap
MRG Projs topomap
2 parents 5012fda + 6287d3d commit 6b08e27

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

mne/viz/evoked.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,7 @@ def whitened_gfp(x, rank=None):
450450
suptitle = ('Whitened evoked (left, best estimator = "%s")\n'
451451
'and global field power '
452452
'(right, comparison of estimators)' %
453-
noise_cov[0]['method'])
453+
noise_cov[0].get('method', 'empirical'))
454454
fig.suptitle(suptitle)
455455

456456
ax_gfp = None
@@ -477,7 +477,7 @@ def whitened_gfp(x, rank=None):
477477

478478
if not has_sss:
479479
evokeds_white[0].plot(unit=False, axes=axes_evoked,
480-
hline=[-1.96, 1.96])
480+
hline=[-1.96, 1.96], show=False)
481481
else:
482482
for ((ch_type, picks), ax) in zip(picks_list, axes_evoked):
483483
ax.plot(times, evokeds_white[0].data[picks].T, color='k')
@@ -492,7 +492,7 @@ def whitened_gfp(x, rank=None):
492492
title = '{0} ({2}{1})'.format(
493493
titles_[ch] if n_columns > 1 else ch,
494494
this_rank, 'rank ' if n_columns > 1 else '')
495-
label = noise_cov['method']
495+
label = noise_cov.get('method', 'empirical')
496496

497497
ax_gfp[i].set_title(title if n_columns > 1 else
498498
'whitened global field power (GFP),'

mne/viz/topomap.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,7 @@ def plot_projs_topomap(projs, layout=None, cmap='RdBu_r', sensors=True,
168168
nrows = math.floor(math.sqrt(n_projs))
169169
ncols = math.ceil(n_projs / nrows)
170170

171-
fig = plt.gcf()
172-
fig.clear()
171+
fig = plt.figure()
173172
for k, proj in enumerate(projs):
174173

175174
ch_names = _clean_names(proj['data']['col_names'])

0 commit comments

Comments
 (0)