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

Add cmap argument for mne.viz.utils.plot_sensors #11720

Merged
merged 8 commits into from
Jun 6, 2023
Merged

Add cmap argument for mne.viz.utils.plot_sensors #11720

merged 8 commits into from
Jun 6, 2023

Conversation

Genuster
Copy link
Contributor

@Genuster Genuster commented Jun 4, 2023

What does this implement/fix?

A cmap argument for the mne.viz.utils.plot_sensors().

Additional information

The colormap currently used is mpl's 'jet'. _get_cmap() converts None to rcParams["image.cmap"], therefore, this PR changes the default colormap of the function.

@welcome
Copy link

welcome bot commented Jun 4, 2023

Hello! 👋 Thanks for opening your first pull request here! ❤️ We will try to get back to you soon. 🚴

Copy link
Member

@agramfort agramfort left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @Genuster can you add an entry in latest.inc to document the improvement ? Thanks again

@Genuster Genuster requested a review from agramfort June 5, 2023 10:44
Copy link
Member

@agramfort agramfort left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thx @Genuster

can you see why CIs complain? thanks

doc/changes/latest.inc Outdated Show resolved Hide resolved
Update names.inc
Change mpl typehint in the plot_sensors docstring.
@Genuster
Copy link
Contributor Author

Genuster commented Jun 6, 2023

@agramfort, I tried to build the docs and check styling, but other than that I'm quite lost with CIs, sorry.

@larsoner
Copy link
Member

larsoner commented Jun 6, 2023

At least some failures were unrelated and were fixed by #11721 so I merged latest main into your branch. Let's see if it comes back green!

Copy link
Member

@larsoner larsoner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other than two minor suggestions LGTM. I'll go ahead and push them so that all CIs run (they usually don't for new contributors) but if you don't like them @Genuster let me know and we can discuss and possibly revert!

mne/viz/utils.py Show resolved Hide resolved
mne/viz/utils.py Outdated Show resolved Hide resolved
@larsoner larsoner enabled auto-merge (squash) June 6, 2023 14:33
@larsoner
Copy link
Member

larsoner commented Jun 6, 2023

Will need #11723 to be green, will merge that into this PR once it lands in main...

@larsoner larsoner merged commit a8ec5d0 into mne-tools:main Jun 6, 2023
@welcome
Copy link

welcome bot commented Jun 6, 2023

🎉 Congrats on merging your first pull request! 🥳 Looking forward to seeing more from you in the future! 💪

larsoner added a commit to larsoner/mne-python that referenced this pull request Jun 23, 2023
* upstream/main: (24 commits)
  Allow int-like as ID of make_fixed_length_events (mne-tools#11748)
  Easycap-M43 montage (mne-tools#11744)
  ENH: Create a Calibrations class for eyetracking data (mne-tools#11719)
  Fix alphabetical order in overview/people.rst, fix sphinx formatting in docstrings and set verbose to keyword-only (mne-tools#11745)
  Add Mathieu Scheltienne to MNE-Python Steering Council (mne-tools#11741)
  removed requirement for curv.*h files to create Brain object (mne-tools#11704)
  [BUG] Fix mne.viz.Brain.add_volume_labels matrix ordering bug (mne-tools#11730)
  Fix installer links (mne-tools#11729)
  MAINT: Update for PyVista deprecation (mne-tools#11727)
  MAINT: Update roadmap (mne-tools#11724)
  MAINT: Update download link [skip azp] [skip cirrus] [skip actions]
  fix case for chpi_info[1] == None (mne-tools#11714)
  Add cmap argument for mne.viz.utils.plot_sensors (mne-tools#11720)
  BUG: Fix one more PySide6 bug (mne-tools#11723)
  MAINT: Fix PySide6 and PyVista compat (mne-tools#11721)
  MRG: If _check_fname() cannot find a file, display the path in quotation marks to help spot accidental trailing spaces (mne-tools#11718)
  Add "array-like" to `_validate_type()` (mne-tools#11713)
  MAINT: Avoid problematic PySide6 (mne-tools#11715)
  Fix installer links (mne-tools#11709)
  Updating change log after PR mne-tools#11575 (mne-tools#11707)
  ...
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.

3 participants