MRG, ENH: Add cortex, fix sensors #9750
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.

Closes #9744
Fixes bug introduced in [ENH, MRG] Add
mne.viz.Brain.plot_sensorsand refactormne.viz.plot_alignment#9585 (cc @alexrockhill) where fNIRS and projected EEG sensors were not scaled properly based onunitsFixes a bug where we iterated over some views twice (in the case of
hemi='both') when we should have just done it once -- this is fixed by iterating over'vol'as the hemiAdds support for custom
cortexcolor mappings inmne.viz.Brain, which is something I've wanted for a while and was necessary to restore this image from stable while still usingmne.viz.Braininstead ofplot_alignment:Streamlines the iteration over views by calling
.subplotinside_iter_viewsrather than doing it manually each time (cc @GuillaumeFavelier )