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

MRG+1: better title in plot_compare_evokeds (closes #6165) #6173

Merged
merged 4 commits into from
Apr 22, 2019
Merged
Show file tree
Hide file tree
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
2 changes: 2 additions & 0 deletions mne/viz/evoked.py
Original file line number Diff line number Diff line change
Expand Up @@ -1875,6 +1875,8 @@ def plot_compare_evokeds(evokeds, picks=None, gfp=False, colors=None,
_validate_type(vlines, (list, tuple), "vlines", "list or tuple")

picks = [] if picks is None else picks
if title is None and picks in _DATA_CH_TYPES_SPLIT:
title = _handle_default('titles')[picks]
picks = _picks_to_idx(info, picks, allow_empty=True)
if len(picks) == 0:
logger.info("No picks, plotting the GFP ...")
Expand Down
5 changes: 3 additions & 2 deletions mne/viz/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@
pick_info, _picks_by_type, pick_channels_cov)
from ..rank import compute_rank
from ..io.proj import setup_proj
from ..utils import verbose, set_config, warn, _check_ch_locs, _check_option
from ..utils import (verbose, set_config, warn, _check_ch_locs, _check_option,
logger)

from ..selection import (read_selection, _SELECTIONS, _EEG_SELECTIONS,
_divide_to_regions)
Expand Down Expand Up @@ -2557,7 +2558,7 @@ def _set_title_multiple_electrodes(title, combine, ch_names, max_chans=6,
title = "{} of {} {}".format(
combine, len(ch_names), ch_type)
elif len(ch_names) > max_chans and combine != "gfp":
warn("More than {} channels, truncating title ...".format(
logger.info("More than {} channels, truncating title ...".format(
max_chans))
title += ", ...\n({} of {} {})".format(
combine, len(ch_names), ch_type,)
Expand Down