Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX: correct logic #4

Merged
merged 1 commit into from
Jan 7, 2013
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions mne/viz.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# License: Simplified BSD
import os
import warnings
from itertools import cycle
from itertools import cycle, combinations
from functools import partial
import copy
import inspect
Expand Down Expand Up @@ -571,9 +571,10 @@ def plot_evoked(evoked, picks=None, unit=True, show=True, ylim=None,
Axes, there must be only one channel type plotted.
"""

if scalings.keys() != units.keys() != titles.keys():
keys = [scalings.keys(), units.keys(), titles.keys()]
iter_keys = combinations(keys, 2)
if any([len(set(a) - set(b)) for a, b in iter_keys]):
names = ['scalings', 'units', 'titles']
keys = [scalings.keys(), units.keys(), titles.keys()]
keys_unique = np.unique(np.concatenate(keys))
misses = [[k for k in keys_unique if k not in k2] for k2 in keys]
inds = np.array([len(m) for m in misses]) > 0
Expand Down