Skip to content

Conversation

@drammock
Copy link
Member

closes #10612
replaces/supersedes #11017

HuseyinOrkun and others added 3 commits September 23, 2022 17:07
…11017)

* Adds a default 'auto' option for spatial_colors argument in Evoked.plot().
Which makes spatial_colors True if channel locations exists and False otherwise.
Changes docstring in plot_evoked() to include string too
Adds option chek to plot_evoked for spatial_colors argument

* simplifies code in _plot_evoked()
changes argument definition from str to 'auto'

* Fixes style issue

* - Adds changes to doc changes
- Fixes comment in evoked.py

* - Fix to the location check logic

* - Adds logic for checking the number of picks, if number of picks is 1, spatial_colors 'auto' becomes False
- Adds spatial_colors = False to relevant tests to avoid errors arising from the change in the default argument
- Fixes latest.inc issue

* - Adds check if picks is None
- Removes some wrong arguments

* - styling

* [ENH] Use spatial_colors by default in Evoked.plot() mne-tools#11017

Adds a default 'auto' option for spatial_colors argument in Evoked.plot(). Which makes spatial_colors True if channel locations exists and False otherwise.
Moves logic for checking spatial_colors argument to a private function named _check_spatial_colors.
Changes docstring in plot_evoked() to include string.
Adds option check to plot_evoked for spatial_colors argument.
Adds changes to doc changes
Adds logic for checking the number of picks, if number of picks is 1, spatial_colors 'auto' becomes False
Adds spatial_colors = False to relevant tests to avoid errors arising from the change in the default argument
Adds check if picks length is one or picks is None

* [ENH] Use spatial_colors by default in Evoked.plot() (mne-tools#11017)

Adds a default 'auto' option for spatial_colors argument in Evoked.plot().
Which makes spatial_colors True if channel locations exists and False otherwise.
Moves logic for checking spatial_colors argument to a private function named _check_spatial_colors.
Changes docstring in plot_evoked() to include string.
Adds option check to plot_evoked for spatial_colors argument.
Adds changes to doc changes
Adds logic for checking the number of picks, if number of picks is 1, spatial_colors 'auto' becomes False
Adds spatial_colors = False to relevant tests to avoid errors arising from the change in the default argument
Adds check if picks length is one or picks is None

* Update latest.inc

fixes duplicate line

* Update doc/changes/latest.inc

Co-authored-by: Richard Höchenberger <richard.hoechenberger@gmail.com>

* Update mne/viz/evoked.py

Co-authored-by: Richard Höchenberger <richard.hoechenberger@gmail.com>

* Update mne/viz/evoked.py

Co-authored-by: Richard Höchenberger <richard.hoechenberger@gmail.com>

* Update doc/changes/latest.inc

Co-authored-by: Richard Höchenberger <richard.hoechenberger@gmail.com>
@larsoner larsoner enabled auto-merge (squash) September 27, 2022 15:10
@larsoner
Copy link
Member

Awesome, marked for merge -- thanks in advance @drammock !

@larsoner larsoner added this to the 1.2 milestone Sep 27, 2022
@hoechenberger
Copy link
Member

Hello @drammock, what's the status of this one? :)

@drammock
Copy link
Member Author

Hello @drammock, what's the status of this one? :)

I am teaching this week, so may not get back to it quickly. CIs are not passing, feel free to take a look yourself.

@larsoner larsoner merged commit 4a44550 into mne-tools:main Sep 28, 2022
@agramfort
Copy link
Member

thanks a lot @drammock 🙏

@hoechenberger
Copy link
Member

Amazing, thanks!

@hoechenberger
Copy link
Member

This will make plots look much nicer by default for our users! Super happy to see this included.

larsoner added a commit to drammock/mne-python that referenced this pull request Sep 28, 2022
…-args

* upstream/main:
  Fix mesh display in tutorial (mne-tools#11200)
  MAINT: Add arm64 CI using CirrusCI (mne-tools#11209)
  Fix spatial colors (mne-tools#11201)
  MAINT: Fix CircleCI error (mne-tools#11205) [circle deploy]
  Add regression-based approach to removing EOG artifacts (mne-tools#11046)
  [DOC, MRG] Minor documentation improvements and remove glossary entry for array-like (mne-tools#11207)
  Fix `include_tmax` not considered in `mne.io.Raw.crop` to check `tmax` in bounds (mne-tools#11204)
  MAINT: Fix notebook backend (mne-tools#11206)
  MRG: Fix displayed Raw duration in Jupyter notebook (mne-tools#11203)
  add EpochsSpectrum.average() (mne-tools#11198)
larsoner added a commit to larsoner/mne-python that referenced this pull request Oct 11, 2022
* upstream/main: (64 commits)
  MAINT: Better check (mne-tools#11229)
  MAINT: Fix link and update instantiation note (mne-tools#11228)
  BUG: Add estimated fiducials when missing / assumed head coords (mne-tools#11212)
  Fix tfr db (mne-tools#11223)
  MAINT: Update link (mne-tools#11222)
  add CPGRL doc section (mne-tools#11216)
  Don't insert superfluous newlines in subprocess log messages (mne-tools#11219)
  purge _get_args helper func (mne-tools#11215)
  Standardize topomap args (mne-tools#11123)
  MAINT: Ensure no datasets are downloaded in tests (mne-tools#11213)
  MAINT: Fix Cirrus caching (mne-tools#11211)
  Fix mesh display in tutorial (mne-tools#11200)
  MAINT: Add arm64 CI using CirrusCI (mne-tools#11209)
  Fix spatial colors (mne-tools#11201)
  MAINT: Fix CircleCI error (mne-tools#11205) [circle deploy]
  Add regression-based approach to removing EOG artifacts (mne-tools#11046)
  [DOC, MRG] Minor documentation improvements and remove glossary entry for array-like (mne-tools#11207)
  Fix `include_tmax` not considered in `mne.io.Raw.crop` to check `tmax` in bounds (mne-tools#11204)
  MAINT: Fix notebook backend (mne-tools#11206)
  MRG: Fix displayed Raw duration in Jupyter notebook (mne-tools#11203)
  ...
@drammock drammock deleted the fix-spatial-colors branch October 26, 2022 14:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use spatial_colors by default in Evoked.plot()

5 participants