Skip to content

Commit

Permalink
[MRG] Fixed group_by titles in evoked_plot. (#10618)
Browse files Browse the repository at this point in the history
* Fixed group_by titles in evoked_plot.

* added contribution info
  • Loading branch information
rezashr authored May 12, 2022
1 parent be56457 commit 97bce19
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions doc/changes/latest.inc
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ Bugs
- Fix issue with saving epochs once :func:`~mne.preprocessing.compute_current_source_density` has been used if a rejection threshold was used first (:gh:`10619` by `Alex Rockhill`_ and `Richard Höchenberger`_)
- Fix bug in :func:`mne.viz.plot_evoked_image` that would cause incorrect sub-titles when using ``group_by`` (:gh:`10618` by `Reza Shoorangiz`_)
API and behavior changes
~~~~~~~~~~~~~~~~~~~~~~~~
- When creating BEM surfaces via :func:`mne.bem.make_watershed_bem` and :func:`mne.bem.make_flash_bem`, the ``copy`` parameter now defaults to ``True``. This means that instead of creating symbolic links inside the FreeSurfer subject's ``bem`` folder, we now create "actual" files. This should avoid troubles when sharing files across different operating systems and file systems (:gh:`10531` by `Richard Höchenberger`_)
Expand Down
6 changes: 3 additions & 3 deletions mne/viz/evoked.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,10 +236,10 @@ def _plot_evoked(evoked, picks, exclude, unit, show, ylim, proj, xlim, hline,
"found in `axes`")
ax = axes[sel]
# the unwieldy dict comp below defaults the title to the sel
titles = ({channel_type(evoked.info, idx): sel
for idx in group_by[sel]} if titles is None else titles)
title = ({channel_type(evoked.info, idx): sel
for idx in group_by[sel]} if titles is None else titles)
_plot_evoked(evoked, group_by[sel], exclude, unit, show, ylim,
proj, xlim, hline, units, scalings, titles,
proj, xlim, hline, units, scalings, title,
ax, plot_type, cmap=cmap, gfp=gfp,
window_title=window_title,
selectable=selectable, noise_cov=noise_cov,
Expand Down

0 comments on commit 97bce19

Please sign in to comment.