Skip to content

Commit

Permalink
MRG+1: better title in plot_compare_evokeds (closes #6165) (#6173)
Browse files Browse the repository at this point in the history
* better title in plot_compare_evokeds (closes #6165)

* use logger.info instead of warn

* fix stupidity

* simplify
  • Loading branch information
drammock authored and larsoner committed Apr 22, 2019
1 parent a2f4634 commit 52949f1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
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

0 comments on commit 52949f1

Please sign in to comment.