Skip to content

Commit

Permalink
Fix to cmap.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaeilepp committed Aug 11, 2015
1 parent 8f09c19 commit 9321818
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions mne/time_frequency/tfr.py
Original file line number Diff line number Diff line change
Expand Up @@ -710,7 +710,7 @@ def plot(self, picks=None, baseline=None, mode='mean', tmin=None,
ax = axes[idx]
fig = ax.get_figure()
onselect_callback = partial(self._onselect, baseline=baseline,
mode=mode, layout=layout, cmap=cmap)
mode=mode, layout=layout)
_imshow_tfr(ax, 0, tmin, tmax, vmin, vmax, onselect_callback,
ylim=None, tfr=data[idx: idx + 1], freq=freqs,
x_label='Time (ms)', y_label='Frequency (Hz)',
Expand All @@ -722,7 +722,7 @@ def plot(self, picks=None, baseline=None, mode='mean', tmin=None,
plt.show()
return fig

def _onselect(self, eclick, erelease, baseline, mode, layout, cmap):
def _onselect(self, eclick, erelease, baseline, mode, layout):
"""Callback function called by rubber band selector in channel tfr."""
import matplotlib.pyplot as plt
from ..viz import plot_tfr_topomap
Expand Down Expand Up @@ -759,7 +759,7 @@ def _onselect(self, eclick, erelease, baseline, mode, layout, cmap):
ax = plt.subplot(1, len(types), idx + 1)
plot_tfr_topomap(self, ch_type=ch_type, tmin=tmin, tmax=tmax,
fmin=fmin, fmax=fmax, layout=layout,
baseline=baseline, mode=mode, cmap=cmap,
baseline=baseline, mode=mode, cmap=None,
title=ch_type, vmin=None, vmax=None,
axes=ax)

Expand Down Expand Up @@ -854,7 +854,7 @@ def plot_topo(self, picks=None, baseline=None, mode='mean', tmin=None,
from mne import find_layout
layout = find_layout(self.info)
onselect_callback = partial(self._onselect, baseline=baseline,
mode=mode, layout=layout, cmap=cmap)
mode=mode, layout=layout)
imshow = partial(_imshow_tfr, tfr=data, freq=freqs, cmap=cmap,
onselect=onselect_callback)

Expand Down
2 changes: 1 addition & 1 deletion mne/viz/tests/test_topomap.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ def test_plot_tfr_topomap():
erelease.ydata = 0.2
pos = [[0.11, 0.11], [0.25, 0.5], [0.0, 0.2], [0.2, 0.39]]
_onselect(eclick, erelease, tfr, pos, 'mag', 1, 3, 1, 3, 'RdBu_r', list())
tfr._onselect(eclick, erelease, None, 'mean', None, 'RdBu_r')
tfr._onselect(eclick, erelease, None, 'mean', None)
plt.close('all')


Expand Down

0 comments on commit 9321818

Please sign in to comment.